diff src/gtknotify.c @ 10060:7570908c558f

[gaim-migrate @ 11030] <seanegan> It removes the Web Browser dropdown if you're running GNOME and uses the GNOME browser instead of what's set in prefs. committer: Tailor Script <tailor@pidgin.im>
author Tim Ringenbach <marv@pidgin.im>
date Thu, 23 Sep 2004 03:09:46 +0000
parents cc68a8c6e741
children 83eb12b1f1a1
line wrap: on
line diff
--- a/src/gtknotify.c	Wed Sep 22 11:54:29 2004 +0000
+++ b/src/gtknotify.c	Thu Sep 23 03:09:46 2004 +0000
@@ -466,6 +466,17 @@
 }
 #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 @@
 	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)