diff --git a/plugins/gtkgui/chat.py b/plugins/gtkgui/chat.py index 530eba8c6..76cf0e0c8 100644 --- a/plugins/gtkgui/chat.py +++ b/plugins/gtkgui/chat.py @@ -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() diff --git a/plugins/gtkgui/systray.py b/plugins/gtkgui/systray.py index 02a5ac5d9..744db6ee7 100644 --- a/plugins/gtkgui/systray.py +++ b/plugins/gtkgui/systray.py @@ -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)