From: Tim R. <ma...@us...> - 2004-09-23 03:10:03
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9194/src Modified Files: gtknotify.c gtkprefs.c Log Message: <seanegan> It removes the Web Browser dropdown if you're running GNOME and uses the GNOME browser instead of what's set in prefs. Index: gtknotify.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtknotify.c,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -p -r1.66 -r1.67 --- gtknotify.c 21 Aug 2004 05:12:23 -0000 1.66 +++ gtknotify.c 23 Sep 2004 03:09:46 -0000 1.67 @@ -466,6 +466,17 @@ uri_command(const char *command, gboolea } #endif /* _WIN32 */ +gboolean +running_gnome(void) +{ + if (g_getenv("GNOME_DESKTOP_SESSION_ID") && g_find_program_in_path("gnome-open") != NULL) + { + return TRUE; + } + + return FALSE; +} + static void * gaim_gtk_notify_uri(const char *uri) { @@ -478,7 +489,12 @@ gaim_gtk_notify_uri(const char *uri) web_browser = gaim_prefs_get_string("/gaim/gtk/browsers/browser"); place = gaim_prefs_get_int("/gaim/gtk/browsers/place"); - if (!strcmp(web_browser, "epiphany") || + /* if they are running gnome, use the gnome web browser */ + if (running_gnome() == TRUE) + { + command = g_strdup_printf("gnome-open \"%s\"", uri); + } + else if (!strcmp(web_browser, "epiphany") || !strcmp(web_browser, "galeon")) { if (place == GAIM_BROWSER_NEW_WINDOW) Index: gtkprefs.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkprefs.c,v retrieving revision 1.207 retrieving revision 1.208 diff -u -d -p -r1.207 -r1.208 --- gtkprefs.c 9 Sep 2004 03:36:34 -0000 1.207 +++ gtkprefs.c 23 Sep 2004 03:09:46 -0000 1.208 @@ -2455,7 +2455,10 @@ void prefs_notebook_init() { prefs_notebook_add_page(_("Network"), NULL, network_page(), &p, NULL, notebook_page++); #ifndef _WIN32 /* We use the registered default browser in windows */ - prefs_notebook_add_page(_("Browser"), NULL, browser_page(), &p, NULL, notebook_page++); + /* if the user is running gnome 2.x, hide the browsers tab */ + if (running_gnome() == FALSE) { + prefs_notebook_add_page(_("Browser"), NULL, browser_page(), &p, NULL, notebook_page++); + } #endif prefs_notebook_add_page(_("Logging"), NULL, logging_page(), &p, NULL, notebook_page++); prefs_notebook_add_page(_("Away / Idle"), NULL, away_page(), &p, NULL, notebook_page++); |