Example #1
0
 def closeFun(self):
     "ask for saving files on exit"
     if doesFileStorageRequiresSave(self):
         answ = messagebox.askyesno(message = "Do you want to save files before leaving?",
                                    icon = "question", title = "Save files?")
         if answ:
             saveFileStorage(self)                
     self.destroy()
Example #2
0
 def _askForSave(self, mode):
     "helper for asking to save files on exit (i.e. closeFun)"
     text = "Do you want to save {} files before leaving?".format(
         m.fullname[mode])
     answ = messagebox.askyesno(message=text,
                                icon="question",
                                title="Save files?")
     if answ:
         saveFileStorage(self, mode)
Example #3
0
 def closeFun(self):
     "ask for saving files on exit"
     if not optionGet("Developer", False, 'bool', True):
         if doesFileStorageRequiresSave(self, m.mode):
             self._askForSave(m.mode)
         for mode in m.fs:
             if mode != m.mode and doesFileStorageRequiresSave(self, mode):
                 self._askForSave(mode)
     path = optionGet("SelectedFilesDirectory",
                      os.path.join(os.getcwd(), "Stuff", "Selected files"), "str", True)
     saveFileStorage(self, m.mode, os.path.join(path, "~last.files"))
     self.destroy()
Example #4
0
 def closeFun(self):
     "ask for saving files on exit"
     if not optionGet("Developer", False, 'bool', True):
         if doesFileStorageRequiresSave(self, m.mode):
             self._askForSave(m.mode)
         for mode in m.fs:
             if mode != m.mode and doesFileStorageRequiresSave(self, mode):
                 self._askForSave(mode)
     path = optionGet("SelectedFilesDirectory",
                      os.path.join(os.getcwd(), "Stuff", "Selected files"),
                      "str", True)
     saveFileStorage(self, m.mode, os.path.join(path, "~last.files"))
     self.destroy()
Example #5
0
 def saveLoadedFiles(self):
     saveFileStorage(self.root, m.mode)
Example #6
0
 def _askForSave(self, mode):
     "helper for asking to save files on exit (i.e. closeFun)"
     text = "Do you want to save {} files before leaving?".format(m.fullname[mode])
     answ = messagebox.askyesno(message = text, icon = "question", title = "Save files?")
     if answ:
         saveFileStorage(self, mode)
Example #7
0
 def saveLoadedFiles(self):
     saveFileStorage(self.root)