From a379079d0abb70383ce00bd855d0989fd93f1b72 Mon Sep 17 00:00:00 2001 From: Alexander Gordeyev Date: Fri, 25 Dec 2015 13:05:08 +0300 Subject: [PATCH] fix progress_bar merging --- gooey/gui/util/quoting.py | 6 ------ gooey/gui/widgets/components.py | 1 + gooey/gui/windows/layouts.py | 2 +- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/gooey/gui/util/quoting.py b/gooey/gui/util/quoting.py index 179fbed..ae6710b 100644 --- a/gooey/gui/util/quoting.py +++ b/gooey/gui/util/quoting.py @@ -1,6 +1,4 @@ -import re import sys -import re if sys.platform.startswith("win"): @@ -9,7 +7,3 @@ if sys.platform.startswith("win"): else: # POSIX shell def quote(value): return "'{}'".format('{}'.format(value).replace("'", "'\\''")) - - -def maybe_quote(string): - return '"{}"'.format(string) if not re.match(r'^".*"$', string) else string diff --git a/gooey/gui/widgets/components.py b/gooey/gui/widgets/components.py index ca875be..eab4ee0 100644 --- a/gooey/gui/widgets/components.py +++ b/gooey/gui/widgets/components.py @@ -243,6 +243,7 @@ DirChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_ FileSaver = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.FileSaverPayload()) DateChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.DateChooserPayload()) TextField = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.TextInputPayload()) +CommandField = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.TextInputPayload(no_qouting=True)) Dropdown = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.DropdownPayload()) Counter = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.CounterPayload()) MultiDirChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.MultiDirChooserPayload()) diff --git a/gooey/gui/windows/layouts.py b/gooey/gui/windows/layouts.py index 519b692..ae8deca 100644 --- a/gooey/gui/windows/layouts.py +++ b/gooey/gui/windows/layouts.py @@ -11,7 +11,7 @@ from gooey.gui.util.quoting import quote basic_config = { 'required': [{ - 'type': 'TextField', + 'type': 'CommandField', 'data': { 'display_name': 'Enter Commands', 'help': 'Enter command line arguments',