[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 01/02: grc: Add hide field in parameter blo
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 01/02: grc: Add hide field in parameter block |
Date: |
Tue, 18 Apr 2017 20:53:29 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit 89d80fa4b30ed37a3fb9a13eb6e6ea52caa14682
Author: Kartik Patel <address@hidden>
Date: Thu Apr 6 15:35:14 2017 +0530
grc: Add hide field in parameter block
---
grc/blocks/parameter.xml | 17 +++++++++++++++++
grc/core/generator/Generator.py | 1 +
2 files changed, 18 insertions(+)
diff --git a/grc/blocks/parameter.xml b/grc/blocks/parameter.xml
index e35b8f4..95d03e1 100644
--- a/grc/blocks/parameter.xml
+++ b/grc/blocks/parameter.xml
@@ -79,6 +79,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>
@@ -95,5 +110,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 1ed7d2d..8c1cd9a 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -335,6 +335,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