implemented Exit button
This commit is contained in:
parent
e11ee5a930
commit
a4406fe5a2
@ -41,6 +41,7 @@ class Window:
|
|||||||
in_button = gtk.Button('In')
|
in_button = gtk.Button('In')
|
||||||
out_button = gtk.Button('Out')
|
out_button = gtk.Button('Out')
|
||||||
exit_button = gtk.Button('Exit')
|
exit_button = gtk.Button('Exit')
|
||||||
|
exit_button.connect("clicked", self.destroy_event)
|
||||||
|
|
||||||
hbox = gtk.HBox()
|
hbox = gtk.HBox()
|
||||||
hbox.pack_start(self.mark_label, expand = True, fill = False)
|
hbox.pack_start(self.mark_label, expand = True, fill = False)
|
||||||
@ -349,6 +350,7 @@ class Window:
|
|||||||
return False
|
return False
|
||||||
|
|
||||||
def destroy_event(self, widget, data=None):
|
def destroy_event(self, widget, data=None):
|
||||||
|
# could be called by window or exit button
|
||||||
gtk.main_quit()
|
gtk.main_quit()
|
||||||
|
|
||||||
def window_key_press_event(self, widget, event, data=None):
|
def window_key_press_event(self, widget, event, data=None):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user