'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' ],
|
'print_time': [ opt_str, 'always' ],
|
||||||
'useemoticons': [ opt_bool, True ],
|
'useemoticons': [ opt_bool, True ],
|
||||||
'sounds_on': [ 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' ],
|
'openwith': [ opt_str, 'gnome-open' ],
|
||||||
'custombrowser': [ opt_str, 'firefox' ],
|
'custombrowser': [ opt_str, 'firefox' ],
|
||||||
'custommailapp': [ opt_str, 'mozilla-thunderbird -compose' ],
|
'custommailapp': [ opt_str, 'mozilla-thunderbird -compose' ],
|
||||||
|
|
|
@ -35,6 +35,7 @@ except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
from gajim import Contact
|
from gajim import Contact
|
||||||
|
from common import helpers
|
||||||
from common import gajim
|
from common import gajim
|
||||||
from common import connection
|
from common import connection
|
||||||
from common import i18n
|
from common import i18n
|
||||||
|
@ -289,9 +290,14 @@ class PreferencesWindow:
|
||||||
self.xml.get_widget('sounds_scrolledwindow').set_sensitive(False)
|
self.xml.get_widget('sounds_scrolledwindow').set_sensitive(False)
|
||||||
self.xml.get_widget('browse_sounds_hbox').set_sensitive(False)
|
self.xml.get_widget('browse_sounds_hbox').set_sensitive(False)
|
||||||
|
|
||||||
#sound player
|
# sound player
|
||||||
self.xml.get_widget('soundplayer_entry').set_text(
|
player = gajim.config.get('soundplayer')
|
||||||
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
|
#sounds treeview
|
||||||
self.sound_tree = self.xml.get_widget('sounds_treeview')
|
self.sound_tree = self.xml.get_widget('sounds_treeview')
|
||||||
|
|
Loading…
Reference in New Issue