detect sound player on first start as soon as gajim is started, not first time we open preferences window. Fixes #3566
This commit is contained in:
parent
3f838e5f3e
commit
b933e6cef0
|
@ -284,14 +284,6 @@ class PreferencesWindow:
|
|||
|
||||
# sound player
|
||||
player = gajim.config.get('soundplayer')
|
||||
if player == '': # only on first time Gajim starts
|
||||
commands = ('aplay', 'play', 'esdplay', 'artsplay')
|
||||
for command in commands:
|
||||
if helpers.is_in_path(command):
|
||||
if command == 'aplay':
|
||||
command += ' -q'
|
||||
gajim.config.set('soundplayer', command)
|
||||
break
|
||||
|
||||
# sounds treeview
|
||||
self.sound_tree = self.xml.get_widget('sounds_treeview')
|
||||
|
|
12
src/gajim.py
12
src/gajim.py
|
@ -3122,6 +3122,18 @@ class Interface:
|
|||
spell = gtkspell.Spell(tv, lang)
|
||||
except:
|
||||
dialogs.AspellDictError(lang)
|
||||
|
||||
if gajim.config.get('soundplayer') == '':
|
||||
print 'first'
|
||||
# only on first time Gajim starts
|
||||
commands = ('aplay', 'play', 'esdplay', 'artsplay')
|
||||
for command in commands:
|
||||
if helpers.is_in_path(command):
|
||||
if command == 'aplay':
|
||||
command += ' -q'
|
||||
gajim.config.set('soundplayer', command)
|
||||
break
|
||||
|
||||
self.last_ftwindow_update = 0
|
||||
|
||||
gobject.timeout_add(100, self.autoconnect)
|
||||
|
|
Loading…
Reference in New Issue