I just hide() for trayicon clicking and stuff. KISS :P and works everywhere

This commit is contained in:
Nikos Kouremenos 2005-03-16 00:03:45 +00:00
parent 069abbd00b
commit ab1e1a09fb
2 changed files with 3 additions and 8 deletions

View file

@ -124,7 +124,7 @@ class roster_window:
if user.groups == []: if user.groups == []:
if user.jid.find("@") <= 0: if user.jid.find("@") <= 0:
user.groups.append('Agents') user.groups.append('Agents')
else: elif user.groups == []:
user.groups.append('general') user.groups.append('general')
if (user.show == 'offline' or user.show == 'error') and not showOffline\ if (user.show == 'offline' or user.show == 'error') and not showOffline\
@ -922,8 +922,7 @@ class roster_window:
def on_gajim_window_delete_event(self, widget, event): def on_gajim_window_delete_event(self, widget, event):
"""When we want to close the window""" """When we want to close the window"""
if self.plugin.systray_visible: if self.plugin.systray_visible:
self.window.iconify() self.window.hide()
win.skip_taskbar_hint = True
else: else:
self.quit_gtkgui_plugin() self.quit_gtkgui_plugin()
return 1 return 1

View file

@ -175,14 +175,10 @@ class systray:
if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
if len(self.jids) == 0: if len(self.jids) == 0:
win = self.plugin.roster.window win = self.plugin.roster.window
print 'before', win.is_active()
if win.is_active(): if win.is_active():
win.iconify() win.hide()
win.skip_taskbar_hint = True
else: else:
win.present() win.present()
win.skip_taskbar_hint = False
print 'after', win.is_active()
else: else:
account = self.jids[0][0] account = self.jids[0][0]
jid = self.jids[0][1] jid = self.jids[0][1]