src/gtknotify.c

changeset 10060
4256ee599d8c
parent 9800
1115830011b8
child 10061
2833056ea11c
--- 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)

mercurial