summaryrefslogtreecommitdiff
path: root/grc/gui/Dialogs.py
diff options
context:
space:
mode:
authorJohnathan Corgan2009-09-18 22:27:38 -0700
committerJohnathan Corgan2009-09-18 22:27:38 -0700
commit4cadf11430e76cd79aa7df20b76c0ced6779248b (patch)
tree25d23752cee01651851251254d1b70f10fb66c5e /grc/gui/Dialogs.py
parentcc5657e25f8e8f364cb6553e9eb8289cc0aca027 (diff)
parent54f913876e5d92fa66f4bcf3a1c773a503e907f8 (diff)
downloadgnuradio-4cadf11430e76cd79aa7df20b76c0ced6779248b.tar.gz
gnuradio-4cadf11430e76cd79aa7df20b76c0ced6779248b.tar.bz2
gnuradio-4cadf11430e76cd79aa7df20b76c0ced6779248b.zip
Merge branch 'grc' of http://gnuradio.org/git/jblum into master
Diffstat (limited to 'grc/gui/Dialogs.py')
-rw-r--r--grc/gui/Dialogs.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index 3cf617b92..af40f47c0 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -57,6 +57,20 @@ def MessageDialogHelper(type, buttons, title=None, markup=None):
message_dialog.destroy()
return response
+
+ERRORS_MARKUP_TMPL="""\
+#for $i, $err_msg in enumerate($errors)
+<b>Error $i:</b>
+$encode($err_msg.replace('\t', ' '))
+
+#end for"""
+def ErrorsDialog(flowgraph): MessageDialogHelper(
+ type=gtk.MESSAGE_ERROR,
+ buttons=gtk.BUTTONS_CLOSE,
+ title='Flow Graph Errors',
+ markup=Utils.parse_template(ERRORS_MARKUP_TMPL, errors=flowgraph.get_error_messages()),
+)
+
class AboutDialog(gtk.AboutDialog):
"""A cute little about dialog."""