From e66a8a343059751bad5783ef5ffdd0d133231186 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Mon, 19 Jun 2006 14:58:41 +0000 Subject: [PATCH] Fix beep for event notification --- src/common/helpers.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/helpers.py b/src/common/helpers.py index e8b4a0eef..f32c20a9c 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -418,7 +418,8 @@ def play_sound(event): if not gajim.config.get('sounds_on'): return path_to_soundfile = gajim.config.get_per('soundevents', event, 'path') - if path_to_soundfile == 'beep': + player = gajim.config.get('soundplayer') + if player == 'beep': print '\a' # make a speaker beep return if path_to_soundfile is None or not os.path.exists(path_to_soundfile): @@ -430,9 +431,8 @@ def play_sound(event): except: pass elif os.name == 'posix': - if gajim.config.get('soundplayer') == '': + if player == '': return - player = gajim.config.get('soundplayer') # we add the path in "" so we have good parsing from shell path_to_soundfile = path_to_soundfile.replace('"', '\\"') # escape " command = player + ' "' + path_to_soundfile + '" &'