Ejemplo n.º 1
0
 def view_closing(self):
     """
     Saves the mantid settings and updates updates the parent
     """
     if not self.ask_before_close or self.view.ask_before_close():
         ConfigService.saveConfig(ConfigService.getUserFilename())
         self.parent.config_updated()
         self.view.close()
         return True
     else:
         #try to stop the close aation
         return False
Ejemplo n.º 2
0
 def view_closing(self):
     """
     Saves the mantid settings and updates updates the parent
     """
     if not self.ask_before_close or self.view.ask_before_close():
         ConfigService.saveConfig(ConfigService.getUserFilename())
         self.parent.config_updated()
         self.view.close()
         if self.changes_that_need_restart:
             self.view.notify_changes_need_restart(
                 self.changes_that_need_restart)
         return True
     else:
         # try to stop the close action
         return False
Ejemplo n.º 3
0
 def action_save_settings_to_file(self):
     ConfigService.saveConfig(ConfigService.getUserFilename())
     filepath = self.view.get_properties_filename(
         accept_mode=QFileDialog.AcceptSave, file_mode=QFileDialog.AnyFile)
     if filepath:
         self.model.save_settings_to_file(filepath, self.all_properties)
Ejemplo n.º 4
0
 def action_save_settings_button(self):
     if not self.ask_before_close or self.view.ask_before_close():
         ConfigService.saveConfig(ConfigService.getUserFilename())
         self.parent.config_updated()
         self.view.close()
Ejemplo n.º 5
0
 def action_save_settings_button(self):
     if not self.ask_before_close or self.view.ask_before_close():
         ConfigService.saveConfig(ConfigService.getUserFilename())
         self.parent.config_updated()
         self.view.close()