def on_close_execute(self): quit = True if self.is_changed: quit = messagebox.askokcancel(_('File changed'), _('Changes not saved. Quit anyway?')) if quit: #prevent tk image errors on python2 ? StockImage.clear_cache() return quit
def on_close_execute(self): quit = True if self.is_changed: quit = messagebox.askokcancel(_('File changed'), _('Changes not saved. Quit anyway?')) if quit: #prevent tk image errors on python2 ? StockImage.clear_cache() return quit
def on_close_execute(self): quit = True if self.is_changed: msg = _('Do you want to save the changes before closing?') quit = self.ask_save_changes(msg) if quit: # prevent tk image errors on python2 ? StockImage.clear_cache() # Save window size and position geom = self.mainwindow.geometry() pref.save_window_size(geom) return quit