diff options
author | manojgudi | 2014-03-02 14:40:58 +0530 |
---|---|---|
committer | manojgudi | 2014-03-02 14:40:58 +0530 |
commit | 760b0acda722de34e830dc9b02cf78a695d001c5 (patch) | |
tree | 1804250ace4c0e8eb317ab93ada6a52431b09289 /grc/python | |
parent | 6d931ce782f0b3229742268eb0d1d323937a052c (diff) | |
download | gnuradio-760b0acda722de34e830dc9b02cf78a695d001c5.tar.gz gnuradio-760b0acda722de34e830dc9b02cf78a695d001c5.tar.bz2 gnuradio-760b0acda722de34e830dc9b02cf78a695d001c5.zip |
Changed API to accomodate <image> tag in grc file of the block
Ex: <image>/home/manoj/Pictures/new.jpg</image>
Diffstat (limited to 'grc/python')
-rw-r--r-- | grc/python/Block.py | 6 | ||||
-rw-r--r-- | grc/python/block.dtd | 4 |
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)> |