comparison 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
comparison
equal deleted inserted replaced
10059:79fafe47d919 10060:7570908c558f
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)