Author: asterix Date: 2008-07-11 08:29:40 +0200 (Fri, 11 Jul 2008) New Revision: 9906
Modified: trunk/src/config.py trunk/src/gajim.py Log: detect sound player on first start as soon as gajim is started, not first time we open preferences window. Fixes #3566
Modified: trunk/src/config.py =================================================================== --- trunk/src/config.py 2008-07-11 06:21:19 UTC (rev 9905) +++ trunk/src/config.py 2008-07-11 06:29:40 UTC (rev 9906) @@ -284,14 +284,6 @@
# 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')
Modified: trunk/src/gajim.py =================================================================== --- trunk/src/gajim.py 2008-07-11 06:21:19 UTC (rev 9905) +++ trunk/src/gajim.py 2008-07-11 06:29:40 UTC (rev 9906) @@ -3122,6 +3122,18 @@ 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)