Skip to content
Snippets Groups Projects
Commit bc721f5b authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

purge the nb_unread variabl when we close a tab

parent 2b30c631
No related branches found
No related tags found
No related merge requests found
......@@ -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]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment