예제 #1
0
 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
예제 #2
0
파일: main.py 프로젝트: codetestcode/pygubu
 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
예제 #3
0
    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