Show all our resources in the account line tooltip
This commit is contained in:
parent
b38911c514
commit
d36a647698
|
@ -665,19 +665,17 @@ class RosterWindow:
|
||||||
if model[iter][C_TYPE] == 'contact':
|
if model[iter][C_TYPE] == 'contact':
|
||||||
account = model[iter][C_ACCOUNT].decode('utf-8')
|
account = model[iter][C_ACCOUNT].decode('utf-8')
|
||||||
jid = model[iter][C_JID].decode('utf-8')
|
jid = model[iter][C_JID].decode('utf-8')
|
||||||
img = model[iter][C_IMG]
|
|
||||||
if self.tooltip.timeout == 0 or self.tooltip.id != props[0]:
|
if self.tooltip.timeout == 0 or self.tooltip.id != props[0]:
|
||||||
self.tooltip.id = row
|
self.tooltip.id = row
|
||||||
self.tooltip.timeout = gobject.timeout_add(500,
|
self.tooltip.timeout = gobject.timeout_add(500,
|
||||||
self.show_tooltip, gajim.contacts[account][jid])
|
self.show_tooltip, gajim.contacts[account][jid])
|
||||||
if model[iter][C_TYPE] == 'account':
|
elif model[iter][C_TYPE] == 'account':
|
||||||
account = model[iter][C_NAME].decode('utf-8')
|
account = model[iter][C_NAME].decode('utf-8')
|
||||||
jid = gajim.get_jid_from_account(account)
|
jid = gajim.get_jid_from_account(account)
|
||||||
self_contact = Contact(jid=jid, name=account, show = gajim.connections[account].get_status(), status=gajim.connections[account].status, resource=gajim.config.get_per('accounts', gajim.connections[account].name, 'resource'), keyID = gajim.config.get_per('accounts', gajim.connections[account].name, 'keyid'))
|
contacts = []
|
||||||
contacts = [self_contact]
|
for resource in gajim.connections[account].connection.getRoster().getResources(jid)+[gajim.config.get_per('accounts', gajim.connections[account].name, 'resource')]:
|
||||||
if gajim.contacts[account].has_key(jid):
|
contact = Contact(jid=jid, name=account, show=gajim.connections[account].get_status(), status=gajim.connections[account].status, resource=resource, keyID = gajim.config.get_per('accounts', gajim.connections[account].name, 'keyid'))
|
||||||
for contact in gajim.contacts[account][jid]:
|
contacts.append(contact)
|
||||||
contacts = [contact]
|
|
||||||
if self.tooltip.timeout == 0 or self.tooltip.id != props[0]:
|
if self.tooltip.timeout == 0 or self.tooltip.id != props[0]:
|
||||||
self.tooltip.id = row
|
self.tooltip.id = row
|
||||||
self.tooltip.timeout = gobject.timeout_add(500,
|
self.tooltip.timeout = gobject.timeout_add(500,
|
||||||
|
|
|
@ -341,8 +341,9 @@ class RosterTooltip(BaseTooltip, StatusTable):
|
||||||
info = '<span size="large" weight="bold">' + prim_contact.jid + '</span>'
|
info = '<span size="large" weight="bold">' + prim_contact.jid + '</span>'
|
||||||
info += '\n<span weight="bold">' + _('Name: ') + '</span>' + \
|
info += '\n<span weight="bold">' + _('Name: ') + '</span>' + \
|
||||||
gtkgui_helpers.escape_for_pango_markup(prim_contact.name)
|
gtkgui_helpers.escape_for_pango_markup(prim_contact.name)
|
||||||
info += '\n<span weight="bold">' + _('Subscription: ') + '</span>' + \
|
if prim_contact.sub:
|
||||||
gtkgui_helpers.escape_for_pango_markup(prim_contact.sub)
|
info += '\n<span weight="bold">' + _('Subscription: ') + '</span>' + \
|
||||||
|
gtkgui_helpers.escape_for_pango_markup(prim_contact.sub)
|
||||||
|
|
||||||
if prim_contact.keyID:
|
if prim_contact.keyID:
|
||||||
keyID = None
|
keyID = None
|
||||||
|
|
Loading…
Reference in New Issue