[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 56/101: grc: gtk3: fix generating virtual/b
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 56/101: grc: gtk3: fix generating virtual/bypassed connections |
Date: |
Thu, 16 Mar 2017 14:58:06 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch python3
in repository gnuradio.
commit 0417d966ab328b51c0cdfeb5d8920cbbcd69c9de
Author: Sebastian Koslowski <address@hidden>
Date: Fri Jul 29 15:42:31 2016 +0200
grc: gtk3: fix generating virtual/bypassed connections
---
grc/core/generator/FlowGraphProxy.py | 6 +++---
grc/core/generator/Generator.py | 6 +++---
grc/gui/Connection.py | 4 ++--
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/grc/core/generator/FlowGraphProxy.py
b/grc/core/generator/FlowGraphProxy.py
index 678be44..23ccf95 100644
--- a/grc/core/generator/FlowGraphProxy.py
+++ b/grc/core/generator/FlowGraphProxy.py
@@ -20,13 +20,13 @@ from __future__ import absolute_import
from six.moves import range
-class FlowGraphProxy(object):
+class FlowGraphProxy(object): # TODO: move this in a refactored Generator
def __init__(self, fg):
- self._fg = fg
+ self.orignal_flowgraph = fg
def __getattr__(self, item):
- return getattr(self._fg, item)
+ return getattr(self.orignal_flowgraph, item)
def get_hier_block_stream_io(self, direction):
"""
diff --git a/grc/core/generator/Generator.py b/grc/core/generator/Generator.py
index 7c9a1ec..a3b0c8a 100644
--- a/grc/core/generator/Generator.py
+++ b/grc/core/generator/Generator.py
@@ -171,11 +171,12 @@ class TopBlockGenerator(object):
connections = [con for con in fg.get_enabled_connections() if cf(con)]
# Get the virtual blocks and resolve their connections
+ connection_factory = fg.parent_platform.Connection
virtual = [c for c in connections if
c.source_block.is_virtual_source()]
for connection in virtual:
source = connection.source_port.resolve_virtual_source()
sink = connection.sink_port
- resolved = fg.parent.Connection(flow_graph=fg, porta=source,
portb=sink)
+ resolved = connection_factory(fg.orignal_flowgraph, source, sink)
connections.append(resolved)
# Remove the virtual connection
connections.remove(connection)
@@ -201,8 +202,7 @@ class TopBlockGenerator(object):
if not sink.enabled:
# Ignore disabled connections
continue
- sink_port = sink.sink_port
- connection = fg.parent.Connection(flow_graph=fg,
porta=source_port, portb=sink_port)
+ connection = connection_factory(fg.orignal_flowgraph,
source_port, sink.sink_port)
connections.append(connection)
# Remove this sink connection
connections.remove(sink)
diff --git a/grc/gui/Connection.py b/grc/gui/Connection.py
index 9b48338..1c00845 100644
--- a/grc/gui/Connection.py
+++ b/grc/gui/Connection.py
@@ -37,9 +37,9 @@ class Connection(Element, _Connection):
The arrow coloring exposes the enabled and valid states.
"""
- def __init__(self, **kwargs):
+ def __init__(self, *args, **kwargs):
Element.__init__(self)
- _Connection.__init__(self, **kwargs)
+ _Connection.__init__(self, *args, **kwargs)
self._color = self._color2 = self._arrow_color = None
- [Commit-gnuradio] [gnuradio] 42/101: grc: gtk3: update main and checks, (continued)
- [Commit-gnuradio] [gnuradio] 42/101: grc: gtk3: update main and checks, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 27/101: grc: gtk3: refactor and update draw code WIP, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 33/101: grc: gtk3: update block surface draw code, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 45/101: grc: fix block init, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 38/101: grc: gtk3: update & fix port drawing code, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 32/101: grc: refactor: remote port domain getter, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 16/101: Merge remote-tracking branch 'grcwg/next_grcwg' into gtk3, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 57/101: grc: gtk3: remove left-over gtk2 usage in generator template, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 43/101: grc: refactor: minor clean-up and fixes, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 44/101: grc: gtk3: fix connection arrows, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 56/101: grc: gtk3: fix generating virtual/bypassed connections,
git <=
- [Commit-gnuradio] [gnuradio] 46/101: grc: dynamic super-classing proof-of-concept =), git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 53/101: grc: make dummy blocks a block subclass, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 68/101: grc: add error messages iterator, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 64/101: grc: gtk3: better lables/shapes handling during flowgraph update, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 62/101: grc: refactor: handle flowgraph and connection super init same as in block, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 65/101: grc: gtk3: dashed lines for message connections, thicker ones for custom domains, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 54/101: grc: refactor: replace get_enabled by prop, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 67/101: grc: remove support for old msg queues, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 60/101: grc: gtk3: update various deprecated gtk calls, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 52/101: grc: refactor: remove get for port and param name, git, 2017/03/16