summaryrefslogtreecommitdiff
path: root/grc/python
diff options
context:
space:
mode:
Diffstat (limited to 'grc/python')
-rw-r--r--grc/python/Block.py6
-rw-r--r--grc/python/block.dtd4
2 files changed, 7 insertions, 3 deletions
diff --git a/grc/python/Block.py b/grc/python/Block.py
index 2c334dfc2..34f232e93 100644
--- a/grc/python/Block.py
+++ b/grc/python/Block.py
@@ -46,16 +46,18 @@ class Block(_Block, _GUIBlock):
self._checks = n.findall('check')
self._callbacks = n.findall('callback')
self._throttle = n.find('throttle') or ''
+ self._image = n.find('image') or ''
+
#build the block
_Block.__init__(
self,
flow_graph=flow_graph,
n=n,
)
- _GUIBlock.__init__(self)
+ _GUIBlock.__init__(self, self._image)
def throttle(self): return bool(self._throttle)
-
+
def validate(self):
"""
Validate this block.
diff --git a/grc/python/block.dtd b/grc/python/block.dtd
index 292ea06cb..f47ba34bf 100644
--- a/grc/python/block.dtd
+++ b/grc/python/block.dtd
@@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
Top level element.
A block contains a name, ...parameters list, and list of IO ports.
-->
-<!ELEMENT block (name, key, category?, throttle?, import*, var_make?, make, callback*, param*, check*, sink*, source*, doc?, grc_source?)>
+<!ELEMENT block (name, key, category?, image?, throttle?, import*, var_make?, make, callback*, param*, check*, sink*, source*, doc?, grc_source?)>
<!--
Sub level elements.
-->
@@ -42,6 +42,8 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
<!ELEMENT doc (#PCDATA)>
<!ELEMENT grc_source (#PCDATA)>
<!ELEMENT name (#PCDATA)>
+<!ELEMENT image (#PCDATA)>
+
<!ELEMENT key (#PCDATA)>
<!ELEMENT check (#PCDATA)>
<!ELEMENT opt (#PCDATA)>