[leon] show account name in tooltip rather than in roster in merged mode. Fixes

#7118
This commit is contained in:
Yann Leboulanger 2012-03-13 14:32:09 +01:00
parent f673ac96f8
commit a0a40c03a8
2 changed files with 5 additions and 23 deletions

View File

@ -1163,29 +1163,6 @@ class RosterWindow:
name += i18n.paragraph_direction_mark(unicode(name))
name += u' (%d)' % nb_connected_contact
# show (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 account_ in gajim.connections:
# useless to add account name
if account_ == account:
continue
for jid_ in gajim.contacts.get_jid_list(account_):
contact_ = gajim.contacts.get_first_contact_from_jid(
account_, jid_)
if contact_.get_shown_name() == contact.get_shown_name() \
and (jid_, account_) != (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'):

View File

@ -498,6 +498,11 @@ class RosterTooltip(NotificationAreaTooltip):
name_markup = u'<span weight="bold">' + \
gobject.markup_escape_text(prim_contact.get_shown_name())\
+ '</span>'
if gajim.config.get('mergeaccounts'):
name_markup += u" <span foreground='#888A85'>(" + \
gobject.markup_escape_text(prim_contact.account.name) \
+ ')</span>'
if self.account and helpers.jid_is_blocked(self.account,
prim_contact.jid):
name_markup += _(' [blocked]')