summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnathan Corgan <johnathan@corganlabs.com>2017-04-18 13:46:20 -0700
committerJohnathan Corgan <johnathan@corganlabs.com>2017-04-18 13:46:20 -0700
commitaf48cf4989adc56e82c6a86fbbef4c61688de7ce (patch)
tree97863644acfe44c8550451e8ae2f62f8c79b9536
parent385f0d4b0a5074bc62bacd6366c4b7474db8ef40 (diff)
parentb44e38ce759dff9622c78863c20e6c0473c76a29 (diff)
Merge branch 'master' into next
-rw-r--r--grc/blocks/parameter.xml17
-rw-r--r--grc/core/generator/Generator.py1
2 files changed, 18 insertions, 0 deletions
diff --git a/grc/blocks/parameter.xml b/grc/blocks/parameter.xml
index b0713218fd..f01527acb0 100644
--- a/grc/blocks/parameter.xml
+++ b/grc/blocks/parameter.xml
@@ -81,6 +81,21 @@ none#slurp
part#slurp
#end if</hide>
</param>
+ <param>
+ <name>Show</name>
+ <key>hide</key>
+ <value></value>
+ <type>enum</type>
+ <hide>part</hide>
+ <option>
+ <name>Always</name>
+ <key>none</key> <!--## Do not hide the parameter value-->
+ </option>
+ <option>
+ <name>Only in Properties</name>
+ <key>part</key> <!--## Partially hide the parameter value-->
+ </option>
+ </param>
<check>len($short_id) in (0, 1)</check>
<check>$short_id == '' or $(short_id).isalpha()</check>
<doc>
@@ -97,5 +112,7 @@ When type is not None, this parameter also becomes a command line option of the
-[short_id] --[id] [value]
The Short ID field may be left blank.
+
+To disable showing the parameter on the hierarchical block in GRC, use Only in Properties option in the Show field.
</doc>
</block>
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index bff70df8f5..dda226c6b2 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -329,6 +329,7 @@ class HierBlockGenerator(TopBlockGenerator):
param_n['key'] = param.get_id()
param_n['value'] = param.get_param('value').get_value()
param_n['type'] = 'raw'
+ param_n['hide'] = param.get_param('hide').get_value()
block_n['param'].append(param_n)
# Bus stuff