diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/fe.h | 2 | ||||
-rw-r--r-- | src/common/text.c | 2 | ||||
-rw-r--r-- | src/fe-gtk/fe-gtk.c | 20 |
3 files changed, 15 insertions, 9 deletions
diff --git a/src/common/fe.h b/src/common/fe.h index f1f3b484..4903ef0e 100644 --- a/src/common/fe.h +++ b/src/common/fe.h @@ -97,7 +97,7 @@ void fe_set_title (struct session *sess); void fe_set_nonchannel (struct session *sess, int state); void fe_set_nick (struct server *serv, char *newnick); void fe_ignore_update (int level); -void fe_beep (void); +void fe_beep (session *sess); void fe_lastlog (session *sess, session *lastlog_sess, char *sstr, gtk_xtext_search_flags flags); void fe_set_lag (server *serv, int lag); void fe_set_throttle (server *serv); diff --git a/src/common/text.c b/src/common/text.c index 2efa376b..a89fd511 100644 --- a/src/common/text.c +++ b/src/common/text.c @@ -2253,7 +2253,7 @@ sound_beep (session *sess) sound_play_event (XP_TE_BEEP); else /* system beep */ - fe_beep (); + fe_beep (sess); } static char * diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index c6a953b7..57ffa2f6 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -682,9 +682,10 @@ fe_print_text (struct session *sess, char *text, time_t stamp) } void -fe_beep (void) +fe_beep (session *sess) { - gdk_beep (); + if (fe_gui_info (sess, 0) != 1) + gdk_beep (); } void @@ -1021,21 +1022,26 @@ fe_open_url_inner (const char *url) #elif defined __APPLE__ try_browser ("open", NULL, url); /* on Mac you can just 'open http://foo.bar/' */ #else + + /* lets try what gtk has built in first. */ + if (gtk_show_uri (NULL, url, GDK_CURRENT_TIME, NULL)) + return; + /* universal desktop URL opener (from xdg-utils). Supports gnome,kde,xfce4. */ if (try_browser ("xdg-open", NULL, url)) return; - /* try to detect GNOME */ + /* try to detect GNOME (this env variable is depreciated) */ if (g_getenv ("GNOME_DESKTOP_SESSION_ID")) { - if (try_browser ("gnome-open", NULL, url)) /* Gnome 2.4+ has this */ + if (try_browser ("gvfs-open", NULL, url)) return; } /* try to detect KDE */ if (g_getenv ("KDE_FULL_SESSION")) { - if (try_browser ("kfmclient", "exec", url)) + if (try_browser ("kde-open", NULL, url)) return; } @@ -1043,8 +1049,8 @@ fe_open_url_inner (const char *url) if (try_browser ("firefox", NULL, url)) return; - /* fresh out of ideas... */ - try_browser ("mozilla", NULL, url); + /* fresh out of ideas... i hear chromium is popular */ + try_browser ("chromium", NULL, url); #endif } |