Mercurial > pidgin
changeset 10061:83eb12b1f1a1
[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 <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Thu, 23 Sep 2004 13:45:48 +0000 |
parents | 7570908c558f |
children | b6178d85d132 |
files | src/gtknotify.c src/gtkprefs.c src/gtkutils.c src/gtkutils.h |
diffstat | 4 files changed, 23 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- 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")) {
--- 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
--- 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; +}
--- 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_ */