diff options
author | Johnathan Corgan | 2009-09-09 17:38:27 -0700 |
---|---|---|
committer | Johnathan Corgan | 2009-09-09 17:38:27 -0700 |
commit | 7f3dc5c263a55d1a992d28d374fc7acc9ebe412b (patch) | |
tree | 61f23680cb4c3a8a83dbf947868e0340725856c3 /grc/python | |
parent | 3c8af34f675eadd64b5fc3f0065793f3b3ff47f0 (diff) | |
parent | b8f69ad7ba49aa85239f6de611ddfd040344f66b (diff) | |
download | gnuradio-7f3dc5c263a55d1a992d28d374fc7acc9ebe412b.tar.gz gnuradio-7f3dc5c263a55d1a992d28d374fc7acc9ebe412b.tar.bz2 gnuradio-7f3dc5c263a55d1a992d28d374fc7acc9ebe412b.zip |
Merge branch 'grc' of http://gnuradio.org/git/jblum into master
* 'grc' of http://gnuradio.org/git/jblum:
use show signal to perform initial gui update
Fixed the usrp and usrp2 probe scripts to work with the new gui param api.
propsdialog tweaks
more code cleanup for properties dialog
Rework the params/properties dialog and param gui class:
renamed params dialog to props dialog
remove unused imports, copyright date update, tweak
Created recursive create labels and shapes method for gui element.
replaced dict[rot] storage of areas and lines with a single list for the current rotation
standardized the Element inheritance __init__ usage in gui
better error msg for empty statements
Implement a recursive validation api in the base Element class.
Diffstat (limited to 'grc/python')
-rw-r--r-- | grc/python/FlowGraph.py | 1 | ||||
-rw-r--r-- | grc/python/Param.py | 6 | ||||
-rw-r--r-- | grc/python/Port.py | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/grc/python/FlowGraph.py b/grc/python/FlowGraph.py index 6b2936c75..4dd18a81f 100644 --- a/grc/python/FlowGraph.py +++ b/grc/python/FlowGraph.py @@ -42,6 +42,7 @@ class FlowGraph(_FlowGraph, _GUIFlowGraph): @param namespace_hash a unique hash for the namespace @return the resultant object """ + if not code: raise Exception, 'Cannot evaluate empty statement.' my_hash = hash(code) ^ namespace_hash #cache if does not exist if not self._eval_cache.has_key(my_hash): diff --git a/grc/python/Param.py b/grc/python/Param.py index e61779136..387fab548 100644 --- a/grc/python/Param.py +++ b/grc/python/Param.py @@ -153,9 +153,9 @@ class Param(_Param, _GUIParam): dt_str = dt_str[:max_len-3] + '...' return dt_str - def get_input_class(self): - if self.get_type() in ('file_open', 'file_save'): return FileParam - return _GUIParam.get_input_class(self) + def get_input(self, *args, **kwargs): + if self.get_type() in ('file_open', 'file_save'): return FileParam(self, *args, **kwargs) + return _GUIParam.get_input(self, *args, **kwargs) def get_color(self): """ diff --git a/grc/python/Port.py b/grc/python/Port.py index 33426d905..6965371df 100644 --- a/grc/python/Port.py +++ b/grc/python/Port.py @@ -45,7 +45,7 @@ def _get_source_from_virtual_source_port(vsp, traversed=[]): lambda b: b.is_virtual_sink(), vsp.get_parent().get_parent().get_enabled_blocks(), ), - )[0].get_sink(vsp.get_key()) + )[0].get_sinks()[0] ), traversed + [vsp], ) except: raise Exception, 'Could not resolve source for virtual source port %s'%vsp |