Fix bug with accounts NOT merged, use get_global_show() and simplify [7354]

This commit is contained in:
Jean-Marie Traissard 2006-11-04 04:06:50 +00:00
parent fefbc29079
commit 1ea1be854b
1 changed files with 3 additions and 12 deletions

View File

@ -2696,18 +2696,9 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
if not accountIter:
return
if not self.regroup:
model[accountIter][C_IMG] = self.jabber_state_images['16'][status]
return
status = 0
for acct in gajim.connections:
connected = gajim.connections[acct].connected
if connected == 1: # connecting
status = 1
break
if gajim.config.get_per('accounts', acct, 'sync_with_global_status') \
and connected > 1 and (status == 0 or connected < status):
status = connected
show = gajim.SHOW_LIST[status]
else: # accounts merged
show = helpers.get_global_show()
model[accountIter][C_IMG] = self.jabber_state_images['16'][show]
def on_status_changed(self, account, status):