From 990a7f62d7c2843da72b3fa3ee4b59395a1d396c Mon Sep 17 00:00:00 2001 From: Dimitur Kirov Date: Sat, 30 Jul 2005 09:09:47 +0000 Subject: [PATCH] bug with the status icon and number of accounts --- src/systray.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/systray.py b/src/systray.py index 27479f2cf..a301cbbc5 100644 --- a/src/systray.py +++ b/src/systray.py @@ -101,7 +101,7 @@ class Systray: self.set_tooltip(nb) # update the tooltip - def change_status(self, global_status = 'offline'): + def change_status(self, global_status = None): ''' change the tooltip text and set tray image to 'global_status' ''' text, single, multiline, multilined = 'Gajim', '', '', False if gajim.contacts: @@ -129,9 +129,9 @@ class Systray: text += ' - ' + helpers.get_uf_show('offline') # change image and status, only if it is different - if self.status != global_status: + if global_status is not None and self.status != global_status: self.status = global_status - self.set_img() + self.set_img() self.tip.set_tip(self.t, text) def start_chat(self, widget, account, jid): @@ -328,12 +328,12 @@ class Systray: # and we set the appropriate tooltip if unread_messages_no > 1: text = _('Gajim - %s unread messages') % unread_messages_no + self.tip.set_tip(self.t, text) elif unread_messages_no == 1: text = _('Gajim - 1 unread message') + self.tip.set_tip(self.t, text) else: # it's None or 0 - uf_show = helpers.get_uf_show(self.status) - text = _('Gajim - %s') % uf_show - self.tip.set_tip(self.t, text) + self.change_status() def hide_icon(self): if self.t: