diff options
author | Yamakaja <dastw@gmx.net> | 2020-07-19 16:18:38 +0200 |
---|---|---|
committer | Sebastian Koslowski <sebastian.koslowski@gmail.com> | 2020-07-23 08:27:30 +0200 |
commit | b9eff3f5e61ae2443f85549bcf60f1fae4ff0447 (patch) | |
tree | b4413369331f18015366fac5c2514fdf7ad5b694 /grc/core/params/param.py | |
parent | c2f42238032e2315371aaec8a64687d99028ccd2 (diff) |
grc: Add dir_select parameter type
This commit adds a new parameter type to GNURadio Companion that allows
you to select directories using a gui. This functionality is
very similar to that of the previously available "file_open" and
"file_save" parameter types, and mainly differs by calling GTKs file
chooser with FileChooserAction.SELECT_FOLDER.
Diffstat (limited to 'grc/core/params/param.py')
-rw-r--r-- | grc/core/params/param.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/grc/core/params/param.py b/grc/core/params/param.py index ef8d7df291..2f829926d3 100644 --- a/grc/core/params/param.py +++ b/grc/core/params/param.py @@ -242,7 +242,7 @@ class Param(Element): ######################### # String Types ######################### - elif dtype in ('string', 'file_open', 'file_save', '_multiline', '_multiline_python_external'): + elif dtype in ('string', 'file_open', 'file_save', 'dir_select', '_multiline', '_multiline_python_external'): # Do not check if file/directory exists, that is a runtime issue try: # Do not evaluate multiline strings (code snippets or comments) @@ -293,7 +293,7 @@ class Param(Element): self._init = True value = self.get_value() # String types - if self.dtype in ('string', 'file_open', 'file_save', '_multiline', '_multiline_python_external'): + if self.dtype in ('string', 'file_open', 'file_save', 'dir_select', '_multiline', '_multiline_python_external'): if not self._init: self.evaluate() return repr(value) if self._stringify_flag else value |