From cac6a82be614b89106da9284f9dfb1717eada98f Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 16 Nov 2005 19:44:06 +0000 Subject: [PATCH] temporary feature: when we are in merge mode, we add (account_name) in the roster when there are 2 contacts with the same nick --- src/roster_window.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/roster_window.py b/src/roster_window.py index ea974d6ad..e4ad576b6 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -245,7 +245,24 @@ class RosterWindow: if len(contact_instances) > 1: 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 if contact.status and gajim.config.get('show_status_msgs_in_roster'): status = contact.status.strip()