From c6513ea7a2dcb76194d63643f76b376e04a26f7f Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Sat, 27 Apr 2013 23:26:26 +0200 Subject: Use "Instant Message Notification" system sound on Windows, use gdk_beep() on Unix Note: gdk_beep() is expected to be replaced with libcanberra stuff. --- src/fe-gtk/fe-gtk.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src') diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c index e11eeaf6..e26fb6d0 100644 --- a/src/fe-gtk/fe-gtk.c +++ b/src/fe-gtk/fe-gtk.c @@ -662,7 +662,17 @@ fe_beep (session *sess) { if (!prefs.hex_gui_focus_omitalerts || !fe_gui_info (sess, 0) == 1) { +#ifdef WIN32 + if (!PlaySound ("Notification.IM", NULL, SND_ALIAS|SND_ASYNC)) + { + /* This is really just a fallback attempt, may or may not work on new Windows releases, especially on x64. + * You should set up the "Instant Message Notification" system sound instead, supported on Vista and up. + */ + Beep (1000, 50); + } +#else gdk_beep (); +#endif } } -- cgit 1.4.1