commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 22/37: Merge remote-tracking branch 'gnurad


From: git
Subject: [Commit-gnuradio] [gnuradio] 22/37: Merge remote-tracking branch 'gnuradio-wg-grc/grc_port_view_options'
Date: Thu, 17 Jul 2014 20:23:42 +0000 (UTC)

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

trondeau pushed a commit to branch master
in repository gnuradio.

commit fddb2ce2b0191aaf509895d362154ae173312a22
Merge: 4a003bb 9f4a4ea
Author: Tom Rondeau <address@hidden>
Date:   Sat Jul 12 09:51:18 2014 -0400

    Merge remote-tracking branch 'gnuradio-wg-grc/grc_port_view_options'

 grc/gui/ActionHandler.py |  5 ++++
 grc/gui/Actions.py       |  4 +++
 grc/gui/Bars.py          |  3 ++
 grc/gui/Element.py       |  6 ++++
 grc/gui/FlowGraph.py     | 77 +++++++++++++++++++++++++++++++-----------------
 grc/gui/Port.py          | 64 ++++++++++++++++++++++++++++++----------
 grc/gui/Preferences.py   |  6 ++++
 7 files changed, 123 insertions(+), 42 deletions(-)

diff --cc grc/gui/Port.py
index 41a458c,284a030..b81b162
--- a/grc/gui/Port.py
+++ b/grc/gui/Port.py
@@@ -57,9 -65,9 +65,9 @@@ class Port(Element)
              index = ports.index(self)
          except:
              if hasattr(self, '_connector_length'):
-                 del self._connector_length;
+                 del self._connector_length
              return
 -        length = len(ports)
 +        length = len(filter(lambda p: not p.get_hide(), ports))
          #reverse the order of ports for these rotations
          if rotation in (180, 270): index = length-index-1
          offset = (self.get_parent().H - length*self.H - 
(length-1)*PORT_SEPARATION)/2
@@@ -82,13 -90,14 +90,14 @@@
          elif (self.is_sink() and rotation == 90) or (self.is_source() and 
rotation == 270):
              y = self.get_parent().W
              x = (PORT_SEPARATION+self.H)*index+offset
-             self.add_area((x, y), (self.H, self.W))
-             self._connector_coordinate = (x+self.H/2, y+1+self.W)
+             self.add_area((x, y), (self.H, W))
+             self._connector_coordinate = (x+self.H/2, y+1+W)
          #the connector length
          self._connector_length = CONNECTOR_EXTENSION_MINIMAL + 
CONNECTOR_EXTENSION_INCREMENT*index
+ 
      def modify_height(self, start_height):
          type_dict = {'bus':(lambda a: a * 3)};
 -        
 +
          if self.get_type() in type_dict:
              return type_dict[self.get_type()](start_height);
          else:
@@@ -222,3 -233,26 +233,26 @@@
              the parent's highlighting status
          """
          return self.get_parent().is_highlighted()
+ 
+     def label_hidden(self):
+         """
+         Figure out if the label should be shown
+ 
+         Returns:
+             true if the label should be hidden
+         """
+         return self._label_hidden and 
Actions.TOGGLE_AUTO_HIDE_PORT_LABELS.get_active()
+ 
+     def mouse_over(self):
+         """
+         Called from flow graph on mouse-over
+         """
+         self._label_hidden = False
+         return Actions.TOGGLE_AUTO_HIDE_PORT_LABELS.get_active()  # only 
redraw if necessary
+ 
+     def mouse_out(self):
+         """
+         Called from flow graph on mouse-out
+         """
+         self._label_hidden = True
 -        return Actions.TOGGLE_AUTO_HIDE_PORT_LABELS.get_active()  # only 
redraw if necessary
++        return Actions.TOGGLE_AUTO_HIDE_PORT_LABELS.get_active()  # only 
redraw if necessary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]