information window now show all resources and status for a user

This commit is contained in:
Yann Leboulanger 2004-06-02 01:56:16 +00:00
parent b9f7d24970
commit 403265a767
2 changed files with 11 additions and 3 deletions

View File

@ -159,13 +159,20 @@ class infoUser_Window:
self.xml.get_widget('label_name').set_text(user.name)
self.xml.get_widget('label_id').set_text(user.jid)
self.xml.get_widget('label_resource').set_text(user.resource)
self.xml.get_widget('label_sub').set_text(user.sub)
self.xml.get_widget('entry_name').set_text(user.name)
resources = user.resource
if not user.status:
user.status = ''
self.xml.get_widget('label_status').set_text(user.show + ' : ' + \
user.status)
stats = user.show + ' : ' + user.status
for u in self.plugin.roster.contacts[account][user.jid]:
if u.resource != user.resource:
resources += '\n' + u.resource
if not u.status:
u.status = ''
stats += '\n' + u.show + ' : ' + u.status
self.xml.get_widget('label_resource').set_text(resources)
self.xml.get_widget('label_status').set_text(stats)
self.init_lists()
plugin.send('ASK_VCARD', account, self.user.jid)

View File

@ -1232,6 +1232,7 @@ class plugin:
model = self.roster.tree.get_model()
while self.queueIN.empty() == 0:
ev = self.queueIN.get()
#('ROSTER', account, array)
if ev[0] == 'ROSTER':
self.roster.mklists(ev[2], ev[1])
self.roster.draw_roster()