change icon in message window only if all the connexions of the user (with differents resources) are off.

This commit is contained in:
Yann Leboulanger 2004-05-25 01:18:56 +00:00
parent b5cf353af9
commit b819f1c9cf
1 changed files with 10 additions and 5 deletions

View File

@ -534,14 +534,19 @@ class roster_Window:
for i in iters:
if self.pixbufs.has_key(show):
model.set_value(i, 0, self.pixbufs[show])
user.show = show
user.status = status
for u in self.contacts[account][user.jid]:
u.show = show
u.status = status
#Print status in chat window
if self.plugin.windows[account]['chats'].has_key(user.jid):
self.plugin.windows[account]['chats'][user.jid].\
img.set_from_pixbuf(self.pixbufs[show])
if len(self.contacts[account][user.jid]) == 0:
self.plugin.windows[account]['chats'][user.jid].\
img.set_from_pixbuf(self.pixbufs[show])
name = user.name
if user.resource != '':
name += '/'+user.resource
self.plugin.windows[account]['chats'][user.jid].print_conversation(\
_("%s is now %s (%s)") % (user.name, show, status), 'status')
_("%s is now %s (%s)") % (name, show, status), 'status')
def on_info(self, widget, user, account):
"""Call infoUser_Window class to display user's information"""