summaryrefslogtreecommitdiff
path: root/grc/gui/Block.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/Block.py')
-rw-r--r--grc/gui/Block.py25
1 files changed, 15 insertions, 10 deletions
diff --git a/grc/gui/Block.py b/grc/gui/Block.py
index 67b80695fa..f961c2281e 100644
--- a/grc/gui/Block.py
+++ b/grc/gui/Block.py
@@ -17,22 +17,26 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
"""
-from Element import Element
-import Utils
+import pygtk
+
+import Actions
import Colors
-from .. base import odict
-from .. python.Param import num_to_str
-from Constants import BORDER_PROXIMITY_SENSITIVITY
+import Utils
from Constants import (
BLOCK_LABEL_PADDING, PORT_SPACING, PORT_SEPARATION, LABEL_SEPARATION,
PORT_BORDER_SEPARATION, POSSIBLE_ROTATIONS, BLOCK_FONT, PARAM_FONT
)
-import Actions
-import pygtk
+from Constants import BORDER_PROXIMITY_SENSITIVITY
+from Element import Element
+from grc.python.base import odict
+from .. python.Param import num_to_str
+
pygtk.require('2.0')
import gtk
import pango
+from ..python.Block import Block as _Block
+
BLOCK_MARKUP_TMPL="""\
#set $foreground = $block.is_valid() and 'black' or 'red'
<span foreground="$foreground" font_desc="$font"><b>$encode($block.get_name())</b></span>"""
@@ -52,15 +56,16 @@ COMMENT_COMPLEXITY_MARKUP_TMPL="""\
"""
-
-class Block(Element):
+class Block(Element, _Block):
"""The graphical signal block."""
- def __init__(self):
+ def __init__(self, flow_graph, n):
"""
Block contructor.
Add graphics related params to the block.
"""
+ _Block.__init__(self, flow_graph, n)
+
self.W = 0
self.H = 0
#add the position param