summaryrefslogtreecommitdiff
path: root/grc
diff options
context:
space:
mode:
authorjblum2008-09-17 03:11:44 +0000
committerjblum2008-09-17 03:11:44 +0000
commita91336462fa381e6744240580c545b01537ddbec (patch)
treefb99adfaec09ca7d6418c8ad32fb53f7e3066809 /grc
parente902750cc04f1d02d589b8237a181bed4c8f626c (diff)
downloadgnuradio-a91336462fa381e6744240580c545b01537ddbec.tar.gz
gnuradio-a91336462fa381e6744240580c545b01537ddbec.tar.bz2
gnuradio-a91336462fa381e6744240580c545b01537ddbec.zip
error message formatting
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9595 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'grc')
-rw-r--r--grc/data/platforms/python/Makefile.am2
-rw-r--r--grc/data/platforms/python/default_flow_graph.grc (renamed from grc/data/platforms/python/default_flow_graph.grc.xml)0
-rw-r--r--grc/src/gui/ParamsDialog.py2
-rw-r--r--grc/src/platforms/base/Block.py4
-rw-r--r--grc/src/platforms/base/Connection.py8
-rw-r--r--grc/src/platforms/base/Port.py2
-rw-r--r--grc/src/platforms/python/Constants.py.in2
7 files changed, 13 insertions, 7 deletions
diff --git a/grc/data/platforms/python/Makefile.am b/grc/data/platforms/python/Makefile.am
index 37ac87aa3..12e747faf 100644
--- a/grc/data/platforms/python/Makefile.am
+++ b/grc/data/platforms/python/Makefile.am
@@ -28,7 +28,7 @@ ourdatadir = $(grc_python_data_dir)
ourdata_DATA = \
block.dtd \
block_tree.xml \
- default_flow_graph.grc.xml \
+ default_flow_graph.grc \
flow_graph.tmpl
EXTRA_DIST = $(ourdata_DATA)
diff --git a/grc/data/platforms/python/default_flow_graph.grc.xml b/grc/data/platforms/python/default_flow_graph.grc
index dea26f3a5..dea26f3a5 100644
--- a/grc/data/platforms/python/default_flow_graph.grc.xml
+++ b/grc/data/platforms/python/default_flow_graph.grc
diff --git a/grc/src/gui/ParamsDialog.py b/grc/src/gui/ParamsDialog.py
index 46940db2e..c424f282a 100644
--- a/grc/src/gui/ParamsDialog.py
+++ b/grc/src/gui/ParamsDialog.py
@@ -86,7 +86,7 @@ class ParamsDialog(gtk.Dialog):
"""
if self.block.is_valid(): self._error_messages_box.hide()
else: self._error_messages_box.show()
- messages = '\n'.join(self.block.get_error_messages())
+ messages = '\n\n'.join(self.block.get_error_messages())
self._error_messages_text_display.set_text(messages)
def _handle_key_press(self, widget, event):
diff --git a/grc/src/platforms/base/Block.py b/grc/src/platforms/base/Block.py
index e3ef84d94..cb350b7cb 100644
--- a/grc/src/platforms/base/Block.py
+++ b/grc/src/platforms/base/Block.py
@@ -146,11 +146,11 @@ class Block(Element):
All checks must evaluate to true.
"""
if not self.get_enabled(): return
- for c in self.get_params() + self.get_sinks() + self.get_sources():
+ for c in self.get_params() + self.get_sinks() + self.get_sources() + self.get_connections():
try: assert(c.is_valid())
except AssertionError:
for msg in c.get_error_messages():
- self._add_error_message('%s: %s'%(c, msg))
+ self._add_error_message('>>> %s:\n\t%s'%(c, msg))
def __str__(self): return 'Block - %s - %s(%s)'%(self.get_id(), self.get_name(), self.get_key())
diff --git a/grc/src/platforms/base/Connection.py b/grc/src/platforms/base/Connection.py
index 3c0b42d78..954d4866a 100644
--- a/grc/src/platforms/base/Connection.py
+++ b/grc/src/platforms/base/Connection.py
@@ -44,7 +44,13 @@ class Connection(Element):
self._source = source
self._sink = sink
- def __str__(self): return 'Connection (%s -> %s)'%(self.get_source(), self.get_sink())
+ def __str__(self):
+ return 'Connection (\n\t%s\n\t\t%s\n\t%s\n\t\t%s\n)'%(
+ self.get_source().get_parent(),
+ self.get_source(),
+ self.get_sink().get_parent(),
+ self.get_sink(),
+ )
def is_connection(self): return True
diff --git a/grc/src/platforms/base/Port.py b/grc/src/platforms/base/Port.py
index 61134791c..672b2e4db 100644
--- a/grc/src/platforms/base/Port.py
+++ b/grc/src/platforms/base/Port.py
@@ -48,7 +48,7 @@ class Port(Element):
The port must be non-empty and type must a possible type.
"""
try: assert(not self.is_empty())
- except AssertionError: self._add_error_message('is empty.')
+ except AssertionError: self._add_error_message('Port is not connected.')
try: assert(self.get_type() in self.TYPES)
except AssertionError: self._add_error_message('Type "%s" is not a possible type.'%self.get_type())
diff --git a/grc/src/platforms/python/Constants.py.in b/grc/src/platforms/python/Constants.py.in
index 973304eba..199b24223 100644
--- a/grc/src/platforms/python/Constants.py.in
+++ b/grc/src/platforms/python/Constants.py.in
@@ -37,7 +37,7 @@ HIER_BLOCK_FILE_MODE = stat.S_IRUSR | stat.S_IWUSR | stat.S_IRGRP | stat.S_IWGRP
FLOW_GRAPH_TEMPLATE = os.path.join(DATA_DIR, 'flow_graph.tmpl')
BLOCK_DTD = os.path.join(DATA_DIR, 'block.dtd')
BLOCK_TREE = os.path.join(DATA_DIR, 'block_tree.xml')
-DEFAULT_FLOW_GRAPH = os.path.join(DATA_DIR, 'default_flow_graph.grc.xml')
+DEFAULT_FLOW_GRAPH = os.path.join(DATA_DIR, 'default_flow_graph.grc')
#coloring
COMPLEX_COLOR_SPEC = '#3399FF'