# HG changeset patch # User Stu Tomlinson # Date 1095947148 0 # Node ID 83eb12b1f1a1fb00446e7381ee151a4e44c9a8f2 # Parent 7570908c558f2ccd092c3f5101e55c6d72b0996c [gaim-migrate @ 11033] grim pointed out that the running_gnome thing caused a compile warning, this fixes it by moving running_gnome() from gtknotify.c and adding it to gtkutils.{c,h} as gaim_running_gnome() committer: Tailor Script diff -r 7570908c558f -r 83eb12b1f1a1 src/gtknotify.c --- a/src/gtknotify.c Thu Sep 23 03:09:46 2004 +0000 +++ b/src/gtknotify.c Thu Sep 23 13:45:48 2004 +0000 @@ -466,17 +466,6 @@ } #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) { @@ -490,10 +479,10 @@ place = gaim_prefs_get_int("/gaim/gtk/browsers/place"); /* if they are running gnome, use the gnome web browser */ - if (running_gnome() == TRUE) + if (gaim_running_gnome() == TRUE) { command = g_strdup_printf("gnome-open \"%s\"", uri); - } + } else if (!strcmp(web_browser, "epiphany") || !strcmp(web_browser, "galeon")) { diff -r 7570908c558f -r 83eb12b1f1a1 src/gtkprefs.c --- a/src/gtkprefs.c Thu Sep 23 03:09:46 2004 +0000 +++ b/src/gtkprefs.c Thu Sep 23 13:45:48 2004 +0000 @@ -2456,7 +2456,7 @@ #ifndef _WIN32 /* We use the registered default browser in windows */ /* if the user is running gnome 2.x, hide the browsers tab */ - if (running_gnome() == FALSE) { + if (gaim_running_gnome() == FALSE) { prefs_notebook_add_page(_("Browser"), NULL, browser_page(), &p, NULL, notebook_page++); } #endif diff -r 7570908c558f -r 83eb12b1f1a1 src/gtkutils.c --- a/src/gtkutils.c Thu Sep 23 03:09:46 2004 +0000 +++ b/src/gtkutils.c Thu Sep 23 13:45:48 2004 +0000 @@ -1227,7 +1227,7 @@ *y = *y - ythickness; else *y = *y + ythickness - requisition.height + 1; - + *y = CLAMP (*y, monitor.y, monitor.y + monitor.height - requisition.height); } @@ -1270,3 +1270,15 @@ gaim_gtk_menu_position_func (menu, x, y, push_in, data); #endif } + +gboolean +gaim_running_gnome(void) +{ + if ((g_getenv("GNOME_DESKTOP_SESSION_ID") != NULL) && + (g_find_program_in_path("gnome-open") != NULL)) + { + return TRUE; + } + + return FALSE; +} diff -r 7570908c558f -r 83eb12b1f1a1 src/gtkutils.h --- a/src/gtkutils.h Thu Sep 23 03:09:46 2004 +0000 +++ b/src/gtkutils.h Thu Sep 23 13:45:48 2004 +0000 @@ -334,4 +334,11 @@ gboolean *push_in, gpointer user_data); +/** + * Check if running Gnome. + * + * @return TRUE if running Gnome, FALSE otherwise. + */ +gboolean gaim_running_gnome(void); + #endif /* _GAIM_GTKUTILS_H_ */