From b819f1c9cfbfdcd84ecc5b12862372434381321a Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 25 May 2004 01:18:56 +0000 Subject: [PATCH] change icon in message window only if all the connexions of the user (with differents resources) are off. --- plugins/gtkgui/gtkgui.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 68e273bd3..20f6da4c2 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -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"""