Beispiel #1
0
 def on_quit_activate(self, widget, data=None, force=False):
     global_runtime_config.prepare_recently_opened_state_machines_list_for_storage()
     if force:
         backup_session.reset_session()
     if not force and global_gui_config.get_config_value("SESSION_RESTORE_ENABLED"):
         backup_session.store_session()
         self.on_delete_check_sm_running()
         force = True
     avoid_shutdown = self.on_delete_event(widget, None, force=force)
     if not avoid_shutdown:
         self.on_destroy(None)
Beispiel #2
0
    def _on_apply_button_clicked(self, *args):
        """Apply button clicked: Apply the configuration
        """
        refresh_required = self.core_config_model.apply_preliminary_config()
        refresh_required |= self.gui_config_model.apply_preliminary_config()

        if not self.gui_config_model.config.get_config_value(
                "SESSION_RESTORE_ENABLED"):
            import rafcon.gui.backup.session as backup_session
            logger.info("Removing current session")
            backup_session.reset_session()
        if refresh_required:
            from rafcon.gui.singleton import main_window_controller
            main_window_controller.get_controller(
                'menu_bar_controller').on_refresh_all_activate(None, None)
        self._popup_message()