standardized the Element inheritance __init__ usage in gui
authorJosh Blum <josh@joshknows.com>
Sat, 5 Sep 2009 08:54:41 +0000 (01:54 -0700)
committerJosh Blum <josh@joshknows.com>
Sat, 5 Sep 2009 08:54:41 +0000 (01:54 -0700)
grc/gui/Block.py
grc/gui/Connection.py
grc/gui/Element.py
grc/gui/FlowGraph.py
grc/gui/Param.py
grc/gui/Platform.py
grc/gui/Port.py

index 0f3e511d82e7879594bc098b293cb283fe1a907d..68c4da9c34fd062c2bef642dd247b215b341f5be 100644 (file)
@@ -37,7 +37,7 @@ BLOCK_MARKUP_TMPL="""\
 class Block(Element):
        """The graphical signal block."""
 
-       def __init__(self, *args, **kwargs):
+       def __init__(self):
                """
                Block contructor.
                Add graphics related params to the block.
index 013bcb00f81556c469ca48f610154e334c423664..a85650ee2da9213c68adfd09b269cea3e1246c6f 100644 (file)
@@ -32,6 +32,8 @@ class Connection(Element):
        The arrow coloring exposes the enabled and valid states.
        """
 
+       def __init__(self): Element.__init__(self)
+
        def get_coordinate(self):
                """
                Get the 0,0 coordinate.
index 3151917237785ad299ac0cc7b756e74ba8d2d2a8..ecf1de1ca30e2a681901ee93089c41dc3b0d045d 100644 (file)
@@ -32,7 +32,7 @@ class Element(object):
        and methods to detect selection of those areas.
        """
 
-       def __init__(self, *args, **kwargs):
+       def __init__(self):
                """
                Make a new list of rectangular areas and lines, and set the coordinate and the rotation.
                """
index 5e645be7274f8e56112915312b14d4755c1a9361..8a908ff5044014fd402eee6dffa79811e43b1fb2 100644 (file)
@@ -39,7 +39,7 @@ class FlowGraph(Element):
        and the connections between inputs and outputs.
        """
 
-       def __init__(self, *args, **kwargs):
+       def __init__(self):
                """
                FlowGraph contructor.
                Create a list for signal blocks and connections. Connect mouse handlers.
index 4955d3336fd1dfbf070d4a4758e520c0bd0d640f..5cc8d9c7f3c70f2d89527514ff2ea93f678074b2 100644 (file)
@@ -114,6 +114,8 @@ Error:
 class Param(Element):
        """The graphical parameter."""
 
+       def __init__(self): Element.__init__(self)
+
        def get_input_class(self):
                """
                Get the graphical gtk class to represent this parameter.
index 8f0aa533d47d33ac48ba7836934cebb18e13c097..8bbfaca2322a5a0a7528733bc83777f2e4e2cd5e 100644 (file)
@@ -19,4 +19,5 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 
 from Element import Element
 
-class Platform(Element): pass
+class Platform(Element):
+       def __init__(self): Element.__init__(self)
index 6fc2c4b155aeec04f26cb69131aa3065d0aab628..9c8d87a16a3085c1ce77ba9299b731590c71d1ef 100644 (file)
@@ -34,7 +34,7 @@ PORT_MARKUP_TMPL="""\
 class Port(Element):
        """The graphical port."""
 
-       def __init__(self, *args, **kwargs):
+       def __init__(self):
                """
                Port contructor.
                Create list of connector coordinates.