refactor code
This commit is contained in:
parent
63449d5f9d
commit
38f867f181
|
@ -251,11 +251,8 @@ class SystrayWin32(systray.Systray):
|
||||||
self.on_left_click()
|
self.on_left_click()
|
||||||
|
|
||||||
def add_jid(self, jid, account, typ):
|
def add_jid(self, jid, account, typ):
|
||||||
l = [account, jid, typ]
|
systray.Systray.add_jid(self, jid, account, typ)
|
||||||
if not l in self.jids:
|
|
||||||
self.jids.append(l)
|
|
||||||
self.set_img()
|
|
||||||
# we append to the number of unread messages
|
|
||||||
nb = self.plugin.roster.nb_unread
|
nb = self.plugin.roster.nb_unread
|
||||||
for acct in gajim.connections:
|
for acct in gajim.connections:
|
||||||
# in chat / groupchat windows
|
# in chat / groupchat windows
|
||||||
|
@ -273,11 +270,8 @@ class SystrayWin32(systray.Systray):
|
||||||
self.systray_winapi.notify_icon.set_tooltip(text)
|
self.systray_winapi.notify_icon.set_tooltip(text)
|
||||||
|
|
||||||
def remove_jid(self, jid, account, typ):
|
def remove_jid(self, jid, account, typ):
|
||||||
l = [account, jid, typ]
|
systray.Systray.remove_jid(self, jid, account, typ)
|
||||||
if l in self.jids:
|
|
||||||
self.jids.remove(l)
|
|
||||||
self.set_img()
|
|
||||||
# we remove from the number of unread messages
|
|
||||||
nb = self.plugin.roster.nb_unread
|
nb = self.plugin.roster.nb_unread
|
||||||
for acct in gajim.connections:
|
for acct in gajim.connections:
|
||||||
# in chat / groupchat windows
|
# in chat / groupchat windows
|
||||||
|
|
Loading…
Reference in New Issue