Fix music_track_info for multiple accounts.

This commit is contained in:
js 2008-05-16 16:04:51 +00:00
parent aaf3ca3161
commit 75ad801f62
2 changed files with 5 additions and 6 deletions

View File

@ -144,6 +144,7 @@ class Connection(ConnectionHandlers):
self.blocked_list = [] self.blocked_list = []
self.blocked_contacts = [] self.blocked_contacts = []
self.blocked_groups = [] self.blocked_groups = []
self.music_track_info = None
self.pep_supported = False self.pep_supported = False
self.mood = {} self.mood = {}
self.tune = {} self.tune = {}

View File

@ -1602,14 +1602,14 @@ class RosterWindow:
continue continue
if not gajim.connections[account].pep_supported: if not gajim.connections[account].pep_supported:
continue continue
if self._music_track_info == music_track_info: if gajim.connections[account].music_track_info == music_track_info:
continue continue
pep.user_send_tune(account, artist, title, source) pep.user_send_tune(account, artist, title, source)
self._music_track_info = music_track_info gajim.connections[account].music_track_info = music_track_info
elif gajim.connections[account].pep_supported: elif gajim.connections[account].pep_supported:
if self._music_track_info != music_track_info: if gajim.connections[account].music_track_info != music_track_info:
pep.user_send_tune(account, artist, title, source) pep.user_send_tune(account, artist, title, source)
self._music_track_info = music_track_info gajim.connections[account].music_track_info = music_track_info
def connected_rooms(self, account): def connected_rooms(self, account):
if account in gajim.gc_connected[account].values(): if account in gajim.gc_connected[account].values():
@ -5727,8 +5727,6 @@ class RosterWindow:
# quitting # quitting
self.quit_on_next_offline = -1 self.quit_on_next_offline = -1
self._music_track_info = None
# uf_show, img, show, sensitive # uf_show, img, show, sensitive
liststore = gtk.ListStore(str, gtk.Image, str, bool) liststore = gtk.ListStore(str, gtk.Image, str, bool)
self.status_combobox = self.xml.get_widget('status_combobox') self.status_combobox = self.xml.get_widget('status_combobox')