def confirm_close(self, parent=None):
"""
Asks confirmation when the main window is closed by the user.
"""
parent_window = None
if parent == None:
parent_window = self.main_window
else:
parent_window = parent
answer = tkMessageBox.askyesno(message="Are you really sure you want to exit PyMod?", title="Exit PyMod?", parent=parent_window)
if answer:
self.main_window.destroy()
评论列表
文章目录