From ad26e9e38155e72b4212ed3e180c67f7d2ada3a1 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Mon, 7 Feb 2005 22:43:34 +0000 Subject: [PATCH] no more need of iconified variable --- plugins/gtkgui/gtkgui.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py index 8e8abdb23..2ad51a2d1 100644 --- a/plugins/gtkgui/gtkgui.py +++ b/plugins/gtkgui/gtkgui.py @@ -2501,7 +2501,7 @@ class systray: if event.type == gtk.gdk.BUTTON_PRESS and event.button == 1: if len(self.jids) == 0: win = self.plugin.roster.xml.get_widget('Gajim') - if self.iconified: + if win.iconify_initially: win.deiconify() else: if win.is_active(): @@ -2521,12 +2521,6 @@ class systray: if event.button == 3: self.mk_menu(event) - def state_changed(self, widget, event): - if event.new_window_state & gtk.gdk.WINDOW_STATE_ICONIFIED: - self.iconified = 1 - else: - self.iconified = 0 - def show_icon(self): if not self.t: self.t = trayicon.TrayIcon("Gajim") @@ -2548,9 +2542,7 @@ class systray: def __init__(self, plugin): self.plugin = plugin self.jids = [] - self.iconified = 0 win = self.plugin.roster.xml.get_widget('Gajim') - win.connect("window-state-event", self.state_changed) self.t = None self.img_tray = gtk.Image() self.status = 'offline'