clear src tag on window.Hide()
This commit is contained in:
@@ -531,16 +531,17 @@ class PopupWindow(Gtk.Window):
|
|||||||
|
|
||||||
def on_window_exit(self, w, e):
|
def on_window_exit(self, w, e):
|
||||||
if self.get_visible():
|
if self.get_visible():
|
||||||
self.src_tag = GLib.timeout_add_seconds(1, self.hide)
|
self.src_tag = GLib.timeout_add_seconds(1, self.hide_and_clear_tag)
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def hide_and_clear_tag(self):
|
||||||
|
self.hide()
|
||||||
|
self.src_tag = 0
|
||||||
|
|
||||||
def on_window_enter(self, *args):
|
def on_window_enter(self, *args):
|
||||||
if self.src_tag > 0:
|
if self.src_tag > 0:
|
||||||
try:
|
GLib.Source.remove(self.src_tag)
|
||||||
GLib.Source.remove(self.src_tag)
|
self.src_tag = 0
|
||||||
self.src_tag = 0
|
|
||||||
except:
|
|
||||||
pass
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def on_window_show(self, *args):
|
def on_window_show(self, *args):
|
||||||
|
Reference in New Issue
Block a user