예제 #1
0
 def on__save__activate(self, action):
     dialog = SaveDialog(self['main_window'])
     res = dialog.run()
     
     if res == gtk.RESPONSE_OK:
         filename = dialog.get_filename()
         print filename
         saver.save_ui(filename, self.current_window)
     
     dialog.destroy()
예제 #2
0
 def _handleExitClicked(self):
     # Remove temporary buttons.
     self._timer.stop()
     self._hideTemporaryButtons()
     
     # Check whether the image has been modified.
     if self._image.isModified():
         savedialog = SaveDialog(self)
         choice = savedialog.exec_()
         if choice == 0: # Cancel
             # Go back to editor mode.
             pass
         elif choice == 1: # Ok
             self.applyImageOperations.emit(self._image.path, self._image.operations())
             self.modeChange.emit('Browser')
         else: # Discard
             self._image.reset()
             self.modeChange.emit('Browser')
     else:
        # The image is not modified.
        self.modeChange.emit('Browser') 
예제 #3
0
    def on_save__activate(self, action):
        dialog = SaveDialog(self['main_window'])
        res = dialog.run()

        if res == gtk.RESPONSE_OK:
            filename = dialog.get_filename()
            print filename
            saver.save_ui(filename, self.current_window)

        dialog.destroy()
예제 #4
0
 def launch_save_dialog(self, dialog_title):
     save_dialog = SaveDialog(self.goghdoc)
     save_dialog.show()