[leon] show account name in tooltip rather than in roster in merged mode. Fixes
#7118
This commit is contained in:
parent
f673ac96f8
commit
a0a40c03a8
2 changed files with 5 additions and 23 deletions
|
@ -1163,29 +1163,6 @@ class RosterWindow:
|
||||||
name += i18n.paragraph_direction_mark(unicode(name))
|
name += i18n.paragraph_direction_mark(unicode(name))
|
||||||
name += u' (%d)' % nb_connected_contact
|
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
|
# add status msg, if not empty, under contact name in
|
||||||
# the treeview
|
# 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'):
|
||||||
|
|
|
@ -498,6 +498,11 @@ class RosterTooltip(NotificationAreaTooltip):
|
||||||
name_markup = u'<span weight="bold">' + \
|
name_markup = u'<span weight="bold">' + \
|
||||||
gobject.markup_escape_text(prim_contact.get_shown_name())\
|
gobject.markup_escape_text(prim_contact.get_shown_name())\
|
||||||
+ '</span>'
|
+ '</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,
|
if self.account and helpers.jid_is_blocked(self.account,
|
||||||
prim_contact.jid):
|
prim_contact.jid):
|
||||||
name_markup += _(' [blocked]')
|
name_markup += _(' [blocked]')
|
||||||
|
|
Loading…
Add table
Reference in a new issue