From 38f867f1819a7ba99685357ad9a23fc427da2a48 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Sat, 24 Sep 2005 10:00:00 +0000 Subject: [PATCH] refactor code --- src/systraywin32.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/systraywin32.py b/src/systraywin32.py index 4a7edc164..cd6c452c5 100644 --- a/src/systraywin32.py +++ b/src/systraywin32.py @@ -251,11 +251,8 @@ class SystrayWin32(systray.Systray): self.on_left_click() def add_jid(self, jid, account, typ): - l = [account, jid, typ] - if not l in self.jids: - self.jids.append(l) - self.set_img() - # we append to the number of unread messages + systray.Systray.add_jid(self, jid, account, typ) + nb = self.plugin.roster.nb_unread for acct in gajim.connections: # in chat / groupchat windows @@ -273,11 +270,8 @@ class SystrayWin32(systray.Systray): self.systray_winapi.notify_icon.set_tooltip(text) def remove_jid(self, jid, account, typ): - l = [account, jid, typ] - if l in self.jids: - self.jids.remove(l) - self.set_img() - # we remove from the number of unread messages + systray.Systray.remove_jid(self, jid, account, typ) + nb = self.plugin.roster.nb_unread for acct in gajim.connections: # in chat / groupchat windows