'aplay', 'play', 'esdplay', 'artsplay' detected first time only
This commit is contained in:
parent
341e060a91
commit
31365c33ab
|
@ -78,7 +78,8 @@ class Config:
|
|||
'print_time': [ opt_str, 'always' ],
|
||||
'useemoticons': [ opt_bool, True ],
|
||||
'sounds_on': [ opt_bool, True ],
|
||||
'soundplayer': [ opt_str, 'play' ],
|
||||
# 'aplay', 'play', 'esdplay', 'artsplay' detected first time only
|
||||
'soundplayer': [ opt_str, '' ],
|
||||
'openwith': [ opt_str, 'gnome-open' ],
|
||||
'custombrowser': [ opt_str, 'firefox' ],
|
||||
'custommailapp': [ opt_str, 'mozilla-thunderbird -compose' ],
|
||||
|
|
|
@ -35,6 +35,7 @@ except:
|
|||
pass
|
||||
|
||||
from gajim import Contact
|
||||
from common import helpers
|
||||
from common import gajim
|
||||
from common import connection
|
||||
from common import i18n
|
||||
|
@ -290,8 +291,13 @@ class PreferencesWindow:
|
|||
self.xml.get_widget('browse_sounds_hbox').set_sensitive(False)
|
||||
|
||||
# sound player
|
||||
self.xml.get_widget('soundplayer_entry').set_text(
|
||||
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):
|
||||
self.xml.get_widget('soundplayer_entry').set_text(command)
|
||||
break
|
||||
|
||||
#sounds treeview
|
||||
self.sound_tree = self.xml.get_widget('sounds_treeview')
|
||||
|
|
Loading…
Reference in New Issue