From bc721f5b1f81469ae3f9a82a549d47d826f18e0c Mon Sep 17 00:00:00 2001 From: Yann Leboulanger <asterix@lagaule.org> Date: Mon, 21 Mar 2005 22:06:34 +0000 Subject: [PATCH] purge the nb_unread variabl when we close a tab --- plugins/gtkgui/chat.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/gtkgui/chat.py b/plugins/gtkgui/chat.py index 1a7bfbd6b8..76cf0e0c81 100644 --- a/plugins/gtkgui/chat.py +++ b/plugins/gtkgui/chat.py @@ -116,6 +116,8 @@ class Chat: def on_window_destroy(self, widget, kind): #kind is 'chats' or 'gc' #clean self.plugin.windows[self.account][kind] for jid in self.xmls: + if self.nb_unread[jid] > 0: + self.plugin.systray.remove_jid(jid, self.account) del self.plugin.windows[self.account][kind][jid] if self.print_time_timeout_id.has_key(jid): gobject.source_remove(self.print_time_timeout_id[jid]) @@ -183,6 +185,10 @@ class Chat: if len(self.xmls) == 1: self.window.destroy() else: + if self.nb_unread[jid] > 0: + self.nb_unread[jid] = 0 + self.show_title() + self.plugin.systray.remove_jid(jid, self.account) if self.print_time_timeout_id.has_key(jid): gobject.source_remove(self.print_time_timeout_id[jid]) del self.print_time_timeout_id[jid] -- GitLab