Skip to content
Snippets Groups Projects
Commit e66a8a34 authored by jimpp's avatar jimpp
Browse files

Fix beep for event notification

parent 2c534b32
No related branches found
No related tags found
No related merge requests found
......@@ -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 + '" &'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment