switch to new window registration logic
This commit is contained in:
parent
c48c1d4fd6
commit
ec1c20540a
|
@ -38,7 +38,7 @@ class Window(Container, gtk.Window):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
"""Class initialiser"""
|
"""Class initialiser"""
|
||||||
self.terminator = Terminator()
|
self.terminator = Terminator()
|
||||||
self.terminator.window = self
|
self.terminator.register_window(self)
|
||||||
|
|
||||||
Container.__init__(self)
|
Container.__init__(self)
|
||||||
gtk.Window.__init__(self)
|
gtk.Window.__init__(self)
|
||||||
|
@ -109,6 +109,7 @@ class Window(Container, gtk.Window):
|
||||||
|
|
||||||
def on_destroy_event(self, widget, data=None):
|
def on_destroy_event(self, widget, data=None):
|
||||||
"""Handle window descruction"""
|
"""Handle window descruction"""
|
||||||
|
self.terminator.deregister_window(self)
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def on_hide_window(self, data):
|
def on_hide_window(self, data):
|
||||||
|
@ -122,7 +123,7 @@ class Window(Container, gtk.Window):
|
||||||
gtk.gdk.WINDOW_STATE_FULLSCREEN)
|
gtk.gdk.WINDOW_STATE_FULLSCREEN)
|
||||||
self.ismaximised = bool(event.new_window_state &
|
self.ismaximised = bool(event.new_window_state &
|
||||||
gtk.gdk.WINDOW_STATE_MAXIMIZED)
|
gtk.gdk.WINDOW_STATE_MAXIMIZED)
|
||||||
dbg('window state changed: fullscreen %s, maximised %s' %
|
dbg('Window::on_window_state_changed: fullscreen=%s, maximised=%s' %
|
||||||
(self.isfullscreen, self.ismaximised))
|
(self.isfullscreen, self.ismaximised))
|
||||||
|
|
||||||
return(False)
|
return(False)
|
||||||
|
|
Loading…
Reference in New Issue