refactor code

This commit is contained in:
Yann Leboulanger 2005-09-24 10:00:00 +00:00
parent 63449d5f9d
commit 38f867f181
1 changed files with 4 additions and 10 deletions

View File

@ -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