[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gnuradio-commit
Subject:    [Commit-gnuradio] [gnuradio] 01/01: grc: fix error message in console when using qtgui blocks
From:       git () gnuradio ! org
Date:       2014-02-26 16:19:34
Message-ID: 20140226161934.653891A8D2C () hertz ! gnuradio ! org
[Download RAW message or body]

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch maint
in repository gnuradio.

commit 5d7316cb093a4708bbfcb5d61829f6e468b1c9aa
Author: Sebastian Koslowski <koslowski@kit.edu>
Date:   Wed Feb 26 14:56:32 2014 +0100

    grc: fix error message in console when using qtgui blocks
---
 grc/python/Param.py | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/grc/python/Param.py b/grc/python/Param.py
index e603d6c..3daa37f 100644
--- a/grc/python/Param.py
+++ b/grc/python/Param.py
@@ -377,11 +377,17 @@ class Param(_Param, _GUIParam):
                 (False, False): 'self.top_layout.addWidget(%(widget)s)',
             }[bool(tab), bool(pos)])%{'tab': tab, 'index': index, 'widget': '%s', \
'pos': pos}  
-            def gui_hint(ws, w):
-                if 'layout' in w: ws = ws.replace('addWidget', 'addLayout')
-                return ws%w
+            # FIXME: Move replace(...) into the make template of the qtgui blocks \
and return a string here +            class GuiHint(object):
+                def __init__(self, ws):
+                    self._ws = ws
 
-            return lambda w: gui_hint(widget_str, w)
+                def __call__(self, w):
+                    return (self._ws.replace('addWidget', 'addLayout') if 'layout' \
in w else self._ws) % w +
+                def __str__(self):
+                    return self._ws
+            return GuiHint(widget_str)
         #########################
         # Grid Position Type
         #########################

_______________________________________________
Commit-gnuradio mailing list
Commit-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/commit-gnuradio


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic