no more need of iconified variable
This commit is contained in:
parent
5a99b1556a
commit
ad26e9e381
|
@ -2501,7 +2501,7 @@ 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.xml.get_widget('Gajim')
|
win = self.plugin.roster.xml.get_widget('Gajim')
|
||||||
if self.iconified:
|
if win.iconify_initially:
|
||||||
win.deiconify()
|
win.deiconify()
|
||||||
else:
|
else:
|
||||||
if win.is_active():
|
if win.is_active():
|
||||||
|
@ -2521,12 +2521,6 @@ class systray:
|
||||||
if event.button == 3:
|
if event.button == 3:
|
||||||
self.mk_menu(event)
|
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):
|
def show_icon(self):
|
||||||
if not self.t:
|
if not self.t:
|
||||||
self.t = trayicon.TrayIcon("Gajim")
|
self.t = trayicon.TrayIcon("Gajim")
|
||||||
|
@ -2548,9 +2542,7 @@ class systray:
|
||||||
def __init__(self, plugin):
|
def __init__(self, plugin):
|
||||||
self.plugin = plugin
|
self.plugin = plugin
|
||||||
self.jids = []
|
self.jids = []
|
||||||
self.iconified = 0
|
|
||||||
win = self.plugin.roster.xml.get_widget('Gajim')
|
win = self.plugin.roster.xml.get_widget('Gajim')
|
||||||
win.connect("window-state-event", self.state_changed)
|
|
||||||
self.t = None
|
self.t = None
|
||||||
self.img_tray = gtk.Image()
|
self.img_tray = gtk.Image()
|
||||||
self.status = 'offline'
|
self.status = 'offline'
|
||||||
|
|
Loading…
Reference in New Issue