From b9eff3f5e61ae2443f85549bcf60f1fae4ff0447 Mon Sep 17 00:00:00 2001
From: Yamakaja <dastw@gmx.net>
Date: Sun, 19 Jul 2020 16:18:38 +0200
Subject: 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.
---
 grc/core/params/param.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'grc/core/params/param.py')

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
-- 
cgit v1.2.3