Re: pass the html file to a browser to open there
- From: Hubert Sokołowski <h sokolowski wsisiz edu pl>
- To: gtk-app-devel-list gnome org
- Subject: Re: pass the html file to a browser to open there
- Date: Sat, 13 Aug 2005 10:53:25 +0200
On Fri, 12 Aug 2005 08:25:23 -0700 (PDT)
Yogesh M <yzonesoft yahoo com> wrote:
I have written a program which works under windows and linux, I have written the help in html. If the user
presses F1, then I want gtk to call a browser and open html. can it be done in gtk.
just as an example
#ifdef __WIN32__
#define BROWSER "explorer"
#else
#define BROWSER "firefox"
#endif
void print_open (const gchar *path)
{
GError *error = NULL;
gchar *s;
s = g_strdup_printf ("%s %s", BROWSER, path);
if (!g_spawn_command_line_async (s, &error))
... // show some error message and free error
g_free (s);
}
but you should check first that firefox is available when on unix
system.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]