fix the systray bug from ticket 128
This commit is contained in:
parent
72e212731c
commit
9d6a1a5dc2
2 changed files with 5 additions and 2 deletions
|
@ -589,7 +589,6 @@ class Chat:
|
||||||
if ((jid != self.get_active_jid()) or (not self.window.is_active()) or \
|
if ((jid != self.get_active_jid()) or (not self.window.is_active()) or \
|
||||||
(not end)) and kind == 'incoming':
|
(not end)) and kind == 'incoming':
|
||||||
self.nb_unread[jid] += 1
|
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.redraw_tab(jid)
|
||||||
self.show_title()
|
self.show_title()
|
||||||
|
|
|
@ -61,6 +61,8 @@ class systray:
|
||||||
self.img_tray.set_from_pixbuf(image.get_pixbuf())
|
self.img_tray.set_from_pixbuf(image.get_pixbuf())
|
||||||
|
|
||||||
def add_jid(self, jid, account):
|
def add_jid(self, jid, account):
|
||||||
|
if not self.t: # the systray is hidden
|
||||||
|
return
|
||||||
list = [account, jid]
|
list = [account, jid]
|
||||||
if not list in self.jids:
|
if not list in self.jids:
|
||||||
self.jids.append(list)
|
self.jids.append(list)
|
||||||
|
@ -81,6 +83,8 @@ class systray:
|
||||||
self.tip.set_tip(self.t, label)
|
self.tip.set_tip(self.t, label)
|
||||||
|
|
||||||
def remove_jid(self, jid, account):
|
def remove_jid(self, jid, account):
|
||||||
|
if not self.t: # the systray is hidden
|
||||||
|
return
|
||||||
list = [account, jid]
|
list = [account, jid]
|
||||||
if list in self.jids:
|
if list in self.jids:
|
||||||
self.jids.remove(list)
|
self.jids.remove(list)
|
||||||
|
|
Loading…
Add table
Reference in a new issue