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_contacts = []
self.blocked_groups = []
self.music_track_info = None
self.pep_supported = False
self.mood = {}
self.tune = {}

View File

@ -1602,14 +1602,14 @@ class RosterWindow:
continue
if not gajim.connections[account].pep_supported:
continue
if self._music_track_info == music_track_info:
if gajim.connections[account].music_track_info == music_track_info:
continue
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:
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)
self._music_track_info = music_track_info
gajim.connections[account].music_track_info = music_track_info
def connected_rooms(self, account):
if account in gajim.gc_connected[account].values():
@ -5727,8 +5727,6 @@ class RosterWindow:
# quitting
self.quit_on_next_offline = -1
self._music_track_info = None
# uf_show, img, show, sensitive
liststore = gtk.ListStore(str, gtk.Image, str, bool)
self.status_combobox = self.xml.get_widget('status_combobox')