From 9284f87a1d053368f5dc46d615b2738dfcb316e7 Mon Sep 17 00:00:00 2001 From: "Bess L. Walker" Date: Sat, 25 Apr 2020 10:41:45 -0600 Subject: [PATCH] Fix Issue 550: MultiDirChooser cannot handle paths with spaces Instead of using the general formatter, use formatters.multiFileChooser, which handles paths with spaces. --- gooey/gui/components/widgets/choosers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gooey/gui/components/widgets/choosers.py b/gooey/gui/components/widgets/choosers.py index 302a430..674ed71 100644 --- a/gooey/gui/components/widgets/choosers.py +++ b/gooey/gui/components/widgets/choosers.py @@ -1,3 +1,4 @@ +from gooey.gui import formatters from gooey.gui.components.widgets import core from gooey.gui.components.widgets.bases import TextContainer, BaseChooser @@ -35,6 +36,9 @@ class MultiDirChooser(BaseChooser): # todo: allow wildcard widget_class = core.MultiDirChooser + def formatOutput(self, metadata, value): + return formatters.multiFileChooser(metadata, value) + class DateChooser(BaseChooser): # todo: allow wildcard @@ -42,4 +46,4 @@ class DateChooser(BaseChooser): class ColourChooser(BaseChooser): - widget_class = core.ColourChooser \ No newline at end of file + widget_class = core.ColourChooser