remove the systray icon when exitting the gtkgui plugin
This commit is contained in:
parent
19f1e79a66
commit
504c25abd6
|
@ -1105,6 +1105,7 @@ class roster_Window:
|
||||||
self.plugin.send('CONFIG', None, ('GtkGui', self.plugin.config))
|
self.plugin.send('CONFIG', None, ('GtkGui', self.plugin.config))
|
||||||
self.plugin.send('QUIT', None, ('gtkgui', 0))
|
self.plugin.send('QUIT', None, ('gtkgui', 0))
|
||||||
print _("plugin gtkgui stopped")
|
print _("plugin gtkgui stopped")
|
||||||
|
self.plugin.systray.t.destroy()
|
||||||
gtk.mainquit()
|
gtk.mainquit()
|
||||||
|
|
||||||
def on_row_activated(self, widget, path, col=0):
|
def on_row_activated(self, widget, path, col=0):
|
||||||
|
@ -1365,7 +1366,7 @@ class systrayDummy:
|
||||||
def set_status(self, status):
|
def set_status(self, status):
|
||||||
pass
|
pass
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
self.t = gtk.Button()
|
||||||
|
|
||||||
|
|
||||||
class systray:
|
class systray:
|
||||||
|
@ -1510,15 +1511,15 @@ class systray:
|
||||||
self.iconified = 0
|
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)
|
win.connect("window-state-event", self.state_changed)
|
||||||
t = trayicon.TrayIcon("Gajim")
|
self.t = trayicon.TrayIcon("Gajim")
|
||||||
eb = gtk.EventBox()
|
eb = gtk.EventBox()
|
||||||
eb.connect("button-press-event", self.on_clicked)
|
eb.connect("button-press-event", self.on_clicked)
|
||||||
self.tip = gtk.Tooltips()
|
self.tip = gtk.Tooltips()
|
||||||
self.tip.set_tip(t, 'Gajim')
|
self.tip.set_tip(self.t, 'Gajim')
|
||||||
self.img_tray = gtk.Image()
|
self.img_tray = gtk.Image()
|
||||||
eb.add(self.img_tray)
|
eb.add(self.img_tray)
|
||||||
t.add(eb)
|
self.t.add(eb)
|
||||||
t.show_all()
|
self.t.show_all()
|
||||||
self.status = 'offline'
|
self.status = 'offline'
|
||||||
self.set_img()
|
self.set_img()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue