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
2 changed files with 12 additions and 8 deletions
|
@ -284,14 +284,6 @@ class PreferencesWindow:
|
||||||
|
|
||||||
# sound player
|
# sound player
|
||||||
player = gajim.config.get('soundplayer')
|
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
|
# sounds treeview
|
||||||
self.sound_tree = self.xml.get_widget('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)
|
spell = gtkspell.Spell(tv, lang)
|
||||||
except:
|
except:
|
||||||
dialogs.AspellDictError(lang)
|
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
|
self.last_ftwindow_update = 0
|
||||||
|
|
||||||
gobject.timeout_add(100, self.autoconnect)
|
gobject.timeout_add(100, self.autoconnect)
|
||||||
|
|
Loading…
Add table
Reference in a new issue