fix the systray bug from ticket 128
This commit is contained in:
parent
72e212731c
commit
9d6a1a5dc2
|
@ -589,7 +589,6 @@ class Chat:
|
|||
if ((jid != self.get_active_jid()) or (not self.window.is_active()) or \
|
||||
(not end)) and kind == 'incoming':
|
||||
self.nb_unread[jid] += 1
|
||||
if self.plugin.systray_enabled:
|
||||
self.plugin.systray.add_jid(jid, self.account)
|
||||
self.plugin.systray.add_jid(jid, self.account)
|
||||
self.redraw_tab(jid)
|
||||
self.show_title()
|
||||
|
|
|
@ -61,6 +61,8 @@ class systray:
|
|||
self.img_tray.set_from_pixbuf(image.get_pixbuf())
|
||||
|
||||
def add_jid(self, jid, account):
|
||||
if not self.t: # the systray is hidden
|
||||
return
|
||||
list = [account, jid]
|
||||
if not list in self.jids:
|
||||
self.jids.append(list)
|
||||
|
@ -81,6 +83,8 @@ class systray:
|
|||
self.tip.set_tip(self.t, label)
|
||||
|
||||
def remove_jid(self, jid, account):
|
||||
if not self.t: # the systray is hidden
|
||||
return
|
||||
list = [account, jid]
|
||||
if list in self.jids:
|
||||
self.jids.remove(list)
|
||||
|
|
Loading…
Reference in New Issue