summaryrefslogtreecommitdiff
path: root/grc/gui/Dialogs.py
diff options
context:
space:
mode:
Diffstat (limited to 'grc/gui/Dialogs.py')
-rw-r--r--grc/gui/Dialogs.py18
1 files changed, 16 insertions, 2 deletions
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index 8d764e28e..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."""
@@ -98,8 +112,8 @@ COLORS_DIALOG_MARKUP_TMPL = """\
#end if
"""
-def ColorsDialog(platform): MessageDialogHelper(
+def TypesDialog(platform): MessageDialogHelper(
type=gtk.MESSAGE_INFO,
buttons=gtk.BUTTONS_CLOSE,
- title='Colors',
+ title='Types',
markup=Utils.parse_template(COLORS_DIALOG_MARKUP_TMPL, colors=platform.get_colors()))