Browse Source

add return_to_config option

pull/254/head
dagrha 7 years ago
committed by Chris
parent
commit
6ad67e6333
3 changed files with 9 additions and 3 deletions
  1. 1
      README.md
  2. 10
      gooey/gui/containers/application.py
  3. 1
      gooey/python_bindings/config_generator.py

1
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 |

10
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()

1
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),

Loading…
Cancel
Save