temporary feature:
when we are in merge mode, we add (account_name) in the roster when there are 2 contacts with the same nick
This commit is contained in:
parent
b3ccd93663
commit
cac6a82be6
1 changed files with 18 additions and 1 deletions
|
@ -246,6 +246,23 @@ class RosterWindow:
|
||||||
if len(contact_instances) > 1:
|
if len(contact_instances) > 1:
|
||||||
name += ' (' + unicode(len(contact_instances)) + ')'
|
name += ' (' + unicode(len(contact_instances)) + ')'
|
||||||
|
|
||||||
|
# FIXME: remove when we use metacontacts
|
||||||
|
# shoz (account_name) if there are 2 contact with same jid in merged mode
|
||||||
|
if self.regroup:
|
||||||
|
add_acct = False
|
||||||
|
# look through all contacts of all accounts
|
||||||
|
for a in gajim.connections:
|
||||||
|
for j in gajim.contacts[a]:
|
||||||
|
# [0] cause it'fster than highest_prio
|
||||||
|
c = gajim.contacts[a][j][0]
|
||||||
|
if c.name == contact.name and (j, a) != (jid, account):
|
||||||
|
add_acct = True
|
||||||
|
break
|
||||||
|
if add_acct:
|
||||||
|
# No need to continue in other account if we already found one
|
||||||
|
break
|
||||||
|
if add_acct:
|
||||||
|
name += ' (' + account + ')'
|
||||||
# add status msg, if not empty, under contact name in the treeview
|
# add status msg, if not empty, under contact name in the treeview
|
||||||
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
|
if contact.status and gajim.config.get('show_status_msgs_in_roster'):
|
||||||
status = contact.status.strip()
|
status = contact.status.strip()
|
||||||
|
|
Loading…
Add table
Reference in a new issue