TrackMusickListener (so is PublishTune) is available only if dbus id supported. Fixes #4153

This commit is contained in:
Yann Leboulanger 2008-07-30 16:08:38 +00:00
parent 673052f1b8
commit bc5fa8f80e
1 changed files with 7 additions and 3 deletions

View File

@ -4873,8 +4873,11 @@ class RosterWindow:
pep_menuitem.set_submenu(pep_submenu)
item = gtk.CheckMenuItem(_('Publish Tune'))
pep_submenu.append(item)
item.set_active(have_tune)
item.connect('toggled', self.on_publish_tune_toggled, account)
if not dbus_support.supported:
item.set_sensitive(False)
else:
item.set_active(have_tune)
item.connect('toggled', self.on_publish_tune_toggled, account)
item = gtk.CheckMenuItem(_('Mood'))
pep_submenu.append(item)
item.set_active(len(gajim.connections[account].mood) > 0)
@ -6304,7 +6307,8 @@ class RosterWindow:
self.setup_and_draw_roster()
for account in gajim.connections:
if gajim.config.get_per('accounts', account, 'publish_tune'):
if gajim.config.get_per('accounts', account, 'publish_tune') and \
dbus_support.supported:
listener = MusicTrackListener.get()
self.music_track_changed_signal = listener.connect(
'music-track-changed', self.music_track_changed)