diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2014-12-05 10:24:08 +0100 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2014-12-05 10:24:08 +0100 |
commit | eb40a41ec28d5f8320d9c0abcb7a2aa2602b9872 (patch) | |
tree | 2a5b96dec2b1ffa3f6f04c7c15ed96df1d24418c /grc/python/Port.py | |
parent | 9372ec7daf7856de7c0e1fe782836a5c722c1473 (diff) |
grc: add gr_message domain
Diffstat (limited to 'grc/python/Port.py')
-rw-r--r-- | grc/python/Port.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/grc/python/Port.py b/grc/python/Port.py index cfeabf8560..fdeb14a4a6 100644 --- a/grc/python/Port.py +++ b/grc/python/Port.py @@ -18,9 +18,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA """ from .. base.Port import Port as _Port +from .. base.Constants import DEFAULT_DOMAIN, GR_MESSAGE_DOMAIN from .. gui.Port import Port as _GUIPort import Constants + def _get_source_from_virtual_sink_port(vsp): """ Resolve the source port that is connected to the given virtual sink port. @@ -91,8 +93,14 @@ class Port(_Port, _GUIPort): dir: the direction """ self._n = n + if n['type'] == 'message': + n['domain'] = GR_MESSAGE_DOMAIN + if 'domain' not in n: + n['domain'] = DEFAULT_DOMAIN + elif n['domain'] == GR_MESSAGE_DOMAIN: + n['key'] = n['name'] + n['type'] = 'message' # for port color if n['type'] == 'msg': n['key'] = 'msg' - if n['type'] == 'message': n['key'] = n['name'] if dir == 'source' and not n.find('key'): n['key'] = str(block._source_count) block._source_count += 1 |