+ # callback for main window destroy
+ def on_mainwindow_destroy (self, args):
+ gtk.main_quit ()
+
+
+ # callback for window closing dialog
+ def on_mainwindow_delete_event (self, window, event):
+ # verify whether really to quit or not if a puzzle is open
+ v = self.verify_quit ()
+ # return False for deleting and True for not deleting
+ return not v
+
+ # callback for menu item quit activated event
+ def on_quit_activate (self, menuitem):
+ # verify whether really to quit or not if a puzzle is open
+ v = self.verify_quit ()
+ # if verified, then quit
+ if v is True:
+ self.window.destroy ()