when there's no systray, prevent gajim from not working.

Although, systray should be access only by a set of method to prevent those
type of things..
This commit is contained in:
Vincent Hanquez 2005-03-29 17:57:07 +00:00
parent dcc01bf542
commit 76338d6e77
2 changed files with 6 additions and 2 deletions

View file

@ -699,6 +699,8 @@ class plugin:
self.systray_enabled = True
def hide_systray(self):
if not self.systray_enabled:
return
self.systray.hide_icon()
self.systray_enabled = False

View file

@ -691,7 +691,8 @@ class Roster_window:
if accountIter:
model.set_value(accountIter, 0, self.pixbufs['connecting'])
self.plugin.connected[account] = 1
self.plugin.systray.set_status('connecting')
if self.plugin.systray_enabled:
self.plugin.systray.set_status('connecting')
save_pass = 0
if self.plugin.accounts[account].has_key('savepass'):
@ -797,7 +798,8 @@ class Roster_window:
self.cb.handler_unblock(self.id_signal_cb)
statuss = ['offline', 'connecting', 'online', 'away', 'xa', 'dnd',\
'invisible']
self.plugin.systray.set_status(statuss[maxi])
if self.plugin.systray_enabled:
self.plugin.systray.set_status(statuss[maxi])
image = self.pixbufs[statuss[maxi]]
if image.get_storage_type() == gtk.IMAGE_ANIMATION:
pixbuf = image.get_animation().get_static_image()