summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2013-04-23 00:45:37 -0400
committerTingPing <tingping@tingping.se>2013-04-23 00:45:37 -0400
commit2550a94f05e51808f22a5803c095fd134d4d81a2 (patch)
treeb3593adc0f2189f7e709429946af294f294275e3 /src
parentbd73c80152cf61ea950f5e93c0d78a68faf530bd (diff)
fix omitting custom sounds
Diffstat (limited to 'src')
-rw-r--r--src/common/text.c15
-rw-r--r--src/fe-gtk/fe-gtk.c11
2 files changed, 13 insertions, 13 deletions
diff --git a/src/common/text.c b/src/common/text.c
index deb3c408..709e05ef 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -2187,12 +2187,15 @@ char *sound_files[NUM_XP];
 void
 sound_beep (session *sess)
 {
-	if (sound_files[XP_TE_BEEP] && sound_files[XP_TE_BEEP][0])
-		/* user defined beep _file_ */
-		sound_play_event (XP_TE_BEEP);
-	else
-		/* system beep */
-		fe_beep (sess);
+	if (!prefs.hex_gui_focus_omitalerts || !fe_gui_info (sess, 0) == 1)
+	{
+		if (sound_files[XP_TE_BEEP] && sound_files[XP_TE_BEEP][0])
+			/* user defined beep _file_ */
+			sound_play_event (XP_TE_BEEP);
+		else
+			/* system beep */
+			fe_beep (sess);
+	}
 }
 
 static char *
diff --git a/src/fe-gtk/fe-gtk.c b/src/fe-gtk/fe-gtk.c
index ec947617..7ad7254b 100644
--- a/src/fe-gtk/fe-gtk.c
+++ b/src/fe-gtk/fe-gtk.c
@@ -671,16 +671,13 @@ fe_beep (session *sess)
 {
 	char *beepfile;
 
-	if (!prefs.hex_gui_focus_omitalerts || !fe_gui_info (sess, 0) == 1)
-	{
 #ifdef WIN32	/* keep this in sync with cfgfiles.c! */
-		beepfile = g_build_filename (HEXCHATSHAREDIR, "share", "sounds", "beep.wav", NULL);
+	beepfile = g_build_filename (HEXCHATSHAREDIR, "share", "sounds", "beep.wav", NULL);
 #else
-		beepfile = g_build_filename (HEXCHATSHAREDIR, "sounds", "freedesktop", "stereo", "hexchat_beep.wav", NULL);
+	beepfile = g_build_filename (HEXCHATSHAREDIR, "sounds", "freedesktop", "stereo", "hexchat_beep.wav", NULL);
 #endif
-		sound_play (beepfile, TRUE, TRUE);
-		g_free (beepfile);
-	}
+	sound_play (beepfile, TRUE, TRUE);
+	g_free (beepfile);
 }
 
 void