[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 64/101: grc: gtk3: better lables/shapes han
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 64/101: grc: gtk3: better lables/shapes handling during flowgraph update |
Date: |
Thu, 16 Mar 2017 14:58:08 +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 979cab9bf5d5986c3df3ea97d0082ed41d313190
Author: Sebastian Koslowski <address@hidden>
Date: Mon Aug 1 17:27:09 2016 +0200
grc: gtk3: better lables/shapes handling during flowgraph update
---
grc/gui/Element.py | 34 +++++++++++++++-------------------
grc/gui/FlowGraph.py | 14 ++++++++++----
2 files changed, 25 insertions(+), 23 deletions(-)
diff --git a/grc/gui/Element.py b/grc/gui/Element.py
index 73be7b8..81a5cbf 100644
--- a/grc/gui/Element.py
+++ b/grc/gui/Element.py
@@ -76,25 +76,6 @@ class Element(object):
rotation = rotation or self.rotation
return rotation in (90, 270)
- def create_labels(self):
- """
- Create labels (if applicable) and call on all children.
- Call this base method before creating labels in the element.
- """
- for child in self.get_children():
- child.create_labels()
-
- def create_shapes(self):
- """
- Create shapes (if applicable) and call on all children.
- Call this base method before creating shapes in the element.
- """
- for child in self.get_children():
- child.create_shapes()
-
- def draw(self, widget, cr):
- raise NotImplementedError()
-
def rotate(self, rotation):
"""
Rotate all of the areas by 90 degrees.
@@ -115,6 +96,21 @@ class Element(object):
dx, dy = delta_coor
self.coordinate = (x + dx, y + dy)
+ def create_labels(self):
+ """
+ Create labels (if applicable) and call on all children.
+ Call this base method before creating labels in the element.
+ """
+
+ def create_shapes(self):
+ """
+ Create shapes (if applicable) and call on all children.
+ Call this base method before creating shapes in the element.
+ """
+
+ def draw(self, widget, cr):
+ raise NotImplementedError()
+
def bounds_from_area(self, area):
x1, y1, w, h = area
x2 = x1 + w
diff --git a/grc/gui/FlowGraph.py b/grc/gui/FlowGraph.py
index 5cd575d..83796f3 100644
--- a/grc/gui/FlowGraph.py
+++ b/grc/gui/FlowGraph.py
@@ -1,5 +1,5 @@
"""
-Copyright 2007-2011 Free Software Foundation, Inc.
+Copyright 2007-2011, 2016q Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
@@ -168,6 +168,7 @@ class FlowGraph(CoreFlowgraph, Element):
"""
self.rewrite()
self.validate()
+ self.update_elements_to_draw()
self.create_labels()
self.create_shapes()
@@ -469,6 +470,14 @@ class FlowGraph(CoreFlowgraph, Element):
continue # skip hidden disabled blocks and connections
self._elements_to_draw.append(element)
+ def create_labels(self):
+ for element in self._elements_to_draw:
+ element.create_labels()
+
+ def create_shapes(self):
+ for element in self._elements_to_draw:
+ element.create_shapes()
+
def _drawables(self):
show_comments = Actions.TOGGLE_SHOW_BLOCK_COMMENTS.get_active()
for element in self._elements_to_draw:
@@ -479,9 +488,6 @@ class FlowGraph(CoreFlowgraph, Element):
def draw(self, widget, cr):
"""Draw blocks connections comment and select rectangle"""
- # todo: only update if required, duplicate logic in
- self.update_elements_to_draw()
-
for draw_element in self._drawables():
cr.save()
draw_element(widget, cr)
- [Commit-gnuradio] [gnuradio] 38/101: grc: gtk3: update & fix port drawing code, (continued)
- [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, 2017/03/16
- [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 <=
- [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
- [Commit-gnuradio] [gnuradio] 40/101: grc: gtk3: remove coordinate getter/setter, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 69/101: grc: gtk3: use darkened bg color for port border, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 55/101: grc: various clean-ups and fixes, git, 2017/03/16
- [Commit-gnuradio] [gnuradio] 48/101: grc: refactor: class for nports port clones, git, 2017/03/16