diff --git a/README.md b/README.md index efb0bbf..ccca53d 100644 --- a/README.md +++ b/README.md @@ -260,6 +260,7 @@ Just about everything in Gooey's overall look and feel can be customized by pass | show_success_modal | Toggles whether or not to show a summary modal after a successful run | | run_validators | Controls whether or not to have Gooey perform validation before calling your program | | poll_external_updates | (Experimental!) When True, Gooey will call your code with a `gooey-seed-ui` CLI argument and use the response to fill out dynamic values in the UI (See: [Using Dynamic Values](#using-dynamic-values))| +| return_to_config | When True, Gooey will return to the configuration settings window upon successful run | | progress_regex | A text regex used to pattern match runtime progress information. See: [Showing Progress](#showing-progress) for a detailed how-to | | progress_expr | A python expression applied to any matches found via the `progress_regex`. See: [Showing Progress](#showing-progress) for a detailed how-to | | disable_progress_bar_animation | Disable the progress bar | diff --git a/gooey/gui/containers/application.py b/gooey/gui/containers/application.py index b7d0700..f556fb2 100644 --- a/gooey/gui/containers/application.py +++ b/gooey/gui/containers/application.py @@ -121,9 +121,13 @@ class GooeyApplication(wx.Frame): """ with transactUI(self): if self.clientRunner.was_success(): - self.showSuccess() - if self.buildSpec.get('show_success_modal', True): - wx.CallAfter(modals.showSuccess) + if self.buildSpec.get('return_to_config', False): + self.showSettings() + self.footer.progress_bar.Show(False) + else: + self.showSuccess() + if self.buildSpec.get('show_success_modal', True): + wx.CallAfter(modals.showSuccess) else: if self.clientRunner.wasForcefullyStopped: self.showForceStopped() diff --git a/gooey/python_bindings/config_generator.py b/gooey/python_bindings/config_generator.py index 9de01fe..d641d2c 100644 --- a/gooey/python_bindings/config_generator.py +++ b/gooey/python_bindings/config_generator.py @@ -46,6 +46,7 @@ def create_from_parser(parser, source_path, **kwargs): 'show_success_modal': kwargs.get('show_success_modal', True), 'force_stop_is_error': kwargs.get('force_stop_is_error', True), 'poll_external_updates':kwargs.get('poll_external_updates', False), + 'return_to_config': kwargs.get('return_to_config', False), # Legacy/Backward compatibility interop 'use_legacy_titles': kwargs.get('use_legacy_titles', True),