quit GTK when window is closed
This commit is contained in:
1 parent
b6ae011b38
commit
6c09225b44
1 file changed
+4
@@ -4,8 +4,12 @@ import gtk
|
||||
class Window:
|
||||
def __init__(self):
|
||||
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
|
||||
self.window.connect("destroy", self.destroy_event)
|
||||
self.window.add(gtk.Label('Hello World'))
|
||||
self.window.show_all()
|
||||
|
||||
def main(self):
|
||||
gtk.main()
|
||||
|
||||
def destroy_event(self, widget, data=None):
|
||||
gtk.main_quit()
|
||||
Reference in new issue
Block a user