Show all our resources in the account line tooltip
This commit is contained in:
		
							parent
							
								
									b38911c514
								
							
						
					
					
						commit
						d36a647698
					
				
					 2 changed files with 8 additions and 9 deletions
				
			
		|  | @ -665,19 +665,17 @@ class RosterWindow: | |||
| 			if model[iter][C_TYPE] == 'contact': | ||||
| 				account = model[iter][C_ACCOUNT].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]: | ||||
| 					self.tooltip.id = row | ||||
| 					self.tooltip.timeout = gobject.timeout_add(500, | ||||
| 						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') | ||||
| 				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 = [self_contact] | ||||
| 				if gajim.contacts[account].has_key(jid): | ||||
| 					for contact in gajim.contacts[account][jid]: | ||||
| 						contacts = [contact] | ||||
| 				contacts = [] | ||||
| 				for resource in gajim.connections[account].connection.getRoster().getResources(jid)+[gajim.config.get_per('accounts', gajim.connections[account].name, 'resource')]: | ||||
| 					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')) | ||||
| 					contacts.append(contact) | ||||
| 				if self.tooltip.timeout == 0 or self.tooltip.id != props[0]: | ||||
| 					self.tooltip.id = row | ||||
| 					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 += '\n<span weight="bold">' + _('Name: ') + '</span>' + \ | ||||
| 			gtkgui_helpers.escape_for_pango_markup(prim_contact.name) | ||||
| 		info += '\n<span weight="bold">' + _('Subscription: ') + '</span>' + \ | ||||
| 			gtkgui_helpers.escape_for_pango_markup(prim_contact.sub) | ||||
| 		if prim_contact.sub: | ||||
| 			info += '\n<span weight="bold">' + _('Subscription: ') + '</span>' + \ | ||||
| 				gtkgui_helpers.escape_for_pango_markup(prim_contact.sub) | ||||
| 
 | ||||
| 		if prim_contact.keyID: | ||||
| 			keyID = None | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue