def quit(self, widget, event=None, data=None):
'''Main quit.
@param widget: who sent the signal.
@param event: the event that happened
@param data: optional data to receive.
'''
msg = ("Do you really want to quit?")
dlg = Gtk.MessageDialog(self.window, Gtk.DialogFlags.MODAL, Gtk.MessageType.QUESTION, Gtk.ButtonsType.YES_NO, msg)
dlg.set_default_response(Gtk.ResponseType.YES)
opt = dlg.run()
dlg.destroy()
if opt != Gtk.ResponseType.YES:
return True
Gtk.main_quit()
if self.dasm_process:
self.dasm_process.terminate()
return True
评论列表
文章目录