quit GTK when window is closed
This commit is contained in:
parent
b6ae011b38
commit
6c09225b44
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user