diff options
author | Berke Viktor <bviktor@hexchat.org> | 2013-04-14 11:56:50 +0200 |
---|---|---|
committer | Berke Viktor <bviktor@hexchat.org> | 2013-04-14 11:56:50 +0200 |
commit | ea0479998a0d44eb2a02c5ec18a692b17aa53274 (patch) | |
tree | b951022af72d1a6fa0f84d2958075be1702374e7 /src/fe-gtk | |
parent | 9272eb43252e8956df6eedd2c96c718b247bca94 (diff) |
Use bundled beep file for beep alerts
Diffstat (limited to 'src/fe-gtk')
-rw-r--r-- | src/fe-gtk/fe-gtk.c | 12 | ||||
-rw-r--r-- | src/fe-gtk/setup.c | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index 52d4a906..c9c384cc 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -669,8 +669,18 @@ fe_print_text (struct session *sess, char *text, time_t stamp) void fe_beep (session *sess) { + char *beepfile; + if (!prefs.hex_gui_focus_omitalerts || !fe_gui_info (sess, 0) == 1) - gdk_beep (); + { +#ifdef WIN32 /* keep this in sync with cfgfiles.c! */ + beepfile = g_build_filename (HEXCHATSHAREDIR, "share", "beep.wav", NULL); +#else + beepfile = g_build_filename (HEXCHATSHAREDIR, "hexchat", "beep.wav", NULL); +#endif + sound_play (beepfile, FALSE, TRUE); + g_free (beepfile); + } } void diff --git a/src/fe-gtk/setup.c b/src/fe-gtk/setup.c index e8cca3a7..261d29d9 100644 --- a/src/fe-gtk/setup.c +++ b/src/fe-gtk/setup.c @@ -1654,7 +1654,7 @@ setup_snd_browse_cb (GtkWidget *button, GtkEntry *entry) static void setup_snd_play_cb (GtkWidget *button, GtkEntry *entry) { - sound_play (entry->text, FALSE); + sound_play (entry->text, FALSE, FALSE); } static void |