Merge commit 'v3.3.0' into upstream
[debian/gnuradio] / grc / python / Platform.py
index 8718fe955a11a074763dcc506e904fdd7e8b62ea..04db0b9b02803b435438b98f08ae6cfefc95530a 100644 (file)
@@ -1,5 +1,5 @@
 """
-Copyright 2008, 2009 Free Software Foundation, Inc.
+Copyright 2008, 2009, 2010 Free Software Foundation, Inc.
 This file is part of GNU Radio
 
 GNU Radio Companion is free software; you can redistribute it and/or
@@ -18,12 +18,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
 import os
-from .. import VERSION #TEMP: until gnuradio has __version__
+from gnuradio import gr
 from .. base.Platform import Platform as _Platform
+from .. gui.Platform import Platform as _GUIPlatform
 from FlowGraph import FlowGraph as _FlowGraph
 from Connection import Connection as _Connection
 from Block import Block as _Block
-from Port import Source,Sink
+from Port import Port as _Port
 from Param import Param as _Param
 from Generator import Generator
 from Constants import \
@@ -42,10 +43,11 @@ COLORS = (#title, #color spec
        ('Integer Vector', Constants.INT_VECTOR_COLOR_SPEC),
        ('Short Vector', Constants.SHORT_VECTOR_COLOR_SPEC),
        ('Byte Vector', Constants.BYTE_VECTOR_COLOR_SPEC),
-       ('Wildcard Type', Constants.WILDCARD_COLOR_SPEC),
+       ('Wildcard', Constants.WILDCARD_COLOR_SPEC),
+       ('Message', Constants.MSG_COLOR_SPEC),
 )
 
-class Platform(_Platform):
+class Platform(_Platform, _GUIPlatform):
 
        def __init__(self):
                """
@@ -59,16 +61,17 @@ class Platform(_Platform):
                _Platform.__init__(
                        self,
                        name='GNU Radio Companion',
-                       version=VERSION,
+                       version=gr.version(),
                        key='grc',
                        license=__doc__.strip(),
-                       website='http://gnuradio.org/trac/wiki/GNURadioCompanion',
+                       website='http://gnuradio.org/redmine/wiki/gnuradio/GNURadioCompanion',
                        block_paths=block_paths,
                        block_dtd=BLOCK_DTD,
                        default_flow_graph=DEFAULT_FLOW_GRAPH,
                        generator=Generator,
                        colors=COLORS,
                )
+               _GUIPlatform.__init__(self)
 
        ##############################################
        # Constructors
@@ -76,6 +79,5 @@ class Platform(_Platform):
        FlowGraph = _FlowGraph
        Connection = _Connection
        Block = _Block
-       Source = Source
-       Sink = Sink
+       Port = _Port
        Param = _Param