From ab1e1a09fb66153be65e85a6ec1a28c1a96a0bfb Mon Sep 17 00:00:00 2001
From: Nikos Kouremenos <kourem@gmail.com>
Date: Wed, 16 Mar 2005 00:03:45 +0000
Subject: [PATCH] I just hide() for trayicon clicking and stuff. KISS :P and
 works everywhere

---
 plugins/gtkgui/roster_window.py | 5 ++---
 plugins/gtkgui/systray.py       | 6 +-----
 2 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/plugins/gtkgui/roster_window.py b/plugins/gtkgui/roster_window.py
index 51aa8d87c8..a9ea1ebd0e 100644
--- a/plugins/gtkgui/roster_window.py
+++ b/plugins/gtkgui/roster_window.py
@@ -124,7 +124,7 @@ class roster_window:
 		if user.groups == []:
 			if user.jid.find("@") <= 0:
 				user.groups.append('Agents')
-			else:
+			elif user.groups == []:
 				user.groups.append('general')
 
 		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):
 		"""When we want to close the window"""
 		if self.plugin.systray_visible:
-			self.window.iconify()
-			win.skip_taskbar_hint = True
+			self.window.hide()
 		else:
 			self.quit_gtkgui_plugin()
 		return 1
diff --git a/plugins/gtkgui/systray.py b/plugins/gtkgui/systray.py
index 54b639fdf1..553de4e307 100644
--- a/plugins/gtkgui/systray.py
+++ b/plugins/gtkgui/systray.py
@@ -175,14 +175,10 @@ class systray:
 		if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1:
 			if len(self.jids) == 0:
 				win = self.plugin.roster.window
-				print 'before', win.is_active()
 				if win.is_active():
-					win.iconify()
-					win.skip_taskbar_hint = True
+					win.hide()
 				else:
 					win.present()
-					win.skip_taskbar_hint = False
-				print 'after', win.is_active()
 			else:
 				account = self.jids[0][0]
 				jid = self.jids[0][1]
-- 
GitLab