src/gtknotify.c

changeset 10060
4256ee599d8c
parent 9800
1115830011b8
child 10061
2833056ea11c
equal deleted inserted replaced
10059:88025f3b3807 10060:4256ee599d8c
464 464
465 return ret; 465 return ret;
466 } 466 }
467 #endif /* _WIN32 */ 467 #endif /* _WIN32 */
468 468
469 gboolean
470 running_gnome(void)
471 {
472 if (g_getenv("GNOME_DESKTOP_SESSION_ID") && g_find_program_in_path("gnome-open") != NULL)
473 {
474 return TRUE;
475 }
476
477 return FALSE;
478 }
479
469 static void * 480 static void *
470 gaim_gtk_notify_uri(const char *uri) 481 gaim_gtk_notify_uri(const char *uri)
471 { 482 {
472 #ifndef _WIN32 483 #ifndef _WIN32
473 char *command = NULL; 484 char *command = NULL;
476 int place; 487 int place;
477 488
478 web_browser = gaim_prefs_get_string("/gaim/gtk/browsers/browser"); 489 web_browser = gaim_prefs_get_string("/gaim/gtk/browsers/browser");
479 place = gaim_prefs_get_int("/gaim/gtk/browsers/place"); 490 place = gaim_prefs_get_int("/gaim/gtk/browsers/place");
480 491
481 if (!strcmp(web_browser, "epiphany") || 492 /* if they are running gnome, use the gnome web browser */
493 if (running_gnome() == TRUE)
494 {
495 command = g_strdup_printf("gnome-open \"%s\"", uri);
496 }
497 else if (!strcmp(web_browser, "epiphany") ||
482 !strcmp(web_browser, "galeon")) 498 !strcmp(web_browser, "galeon"))
483 { 499 {
484 if (place == GAIM_BROWSER_NEW_WINDOW) 500 if (place == GAIM_BROWSER_NEW_WINDOW)
485 command = g_strdup_printf("%s -w \"%s\"", web_browser, uri); 501 command = g_strdup_printf("%s -w \"%s\"", web_browser, uri);
486 else if (place == GAIM_BROWSER_NEW_TAB) 502 else if (place == GAIM_BROWSER_NEW_TAB)

mercurial