Browse Source

fix progress_bar merging

pull/137/head
Alexander Gordeyev 9 years ago
parent
commit
a379079d0a
3 changed files with 2 additions and 7 deletions
  1. 6
      gooey/gui/util/quoting.py
  2. 1
      gooey/gui/widgets/components.py
  3. 2
      gooey/gui/windows/layouts.py

6
gooey/gui/util/quoting.py

@ -1,6 +1,4 @@
import re
import sys import sys
import re
if sys.platform.startswith("win"): if sys.platform.startswith("win"):
@ -9,7 +7,3 @@ if sys.platform.startswith("win"):
else: # POSIX shell else: # POSIX shell
def quote(value): def quote(value):
return "'{}'".format('{}'.format(value).replace("'", "'\\''")) return "'{}'".format('{}'.format(value).replace("'", "'\\''"))
def maybe_quote(string):
return '"{}"'.format(string) if not re.match(r'^".*"$', string) else string

1
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()) FileSaver = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.FileSaverPayload())
DateChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.DateChooserPayload()) DateChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.DateChooserPayload())
TextField = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.TextInputPayload()) 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()) Dropdown = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.DropdownPayload())
Counter = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.CounterPayload()) Counter = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.CounterPayload())
MultiDirChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.MultiDirChooserPayload()) MultiDirChooser = lambda data: BaseGuiComponent(data=data, widget_pack=widget_pack.MultiDirChooserPayload())

2
gooey/gui/windows/layouts.py

@ -11,7 +11,7 @@ from gooey.gui.util.quoting import quote
basic_config = { basic_config = {
'required': [{ 'required': [{
'type': 'TextField',
'type': 'CommandField',
'data': { 'data': {
'display_name': 'Enter Commands', 'display_name': 'Enter Commands',
'help': 'Enter command line arguments', 'help': 'Enter command line arguments',

Loading…
Cancel
Save