From 7dd022bddf56c7e75d4074cebfc6b74e84d967a1 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Sun, 6 Jan 2013 21:40:19 +0000 Subject: [PATCH] display error messages correctly svn: r21014 --- gramps/gui/dialog.py | 4 ++-- gramps/gui/grampsgui.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/gramps/gui/dialog.py b/gramps/gui/dialog.py index f510401bb..871718f7c 100644 --- a/gramps/gui/dialog.py +++ b/gramps/gui/dialog.py @@ -181,10 +181,10 @@ class ErrorDialog(Gtk.MessageDialog): flags=Gtk.DialogFlags.MODAL, type=Gtk.MessageType.ERROR, buttons=Gtk.ButtonsType.CLOSE) - self.set_markup('%s' % msg1) + self.set_markup('%s' % str(msg1)) self.format_secondary_text(msg2) self.set_icon(ICON) - self.set_title("%s - Gramps" % msg1) + self.set_title("%s - Gramps" % str(msg1)) self.show() self.run() self.destroy() diff --git a/gramps/gui/grampsgui.py b/gramps/gui/grampsgui.py index 4c75d3326..4df4ba9f7 100644 --- a/gramps/gui/grampsgui.py +++ b/gramps/gui/grampsgui.py @@ -287,12 +287,14 @@ def __startgramps(errors, argparser): from .dialog import ErrorDialog #handle first existing errors in GUI fashion if errors: - ErrorDialog(errors[0], errors[1]) + for error in errors: + ErrorDialog(error[0], error[1]) Gtk.main_quit() sys.exit(1) if argparser.errors: - ErrorDialog(argparser.errors[0], argparser.errors[1]) + for error in argparser.errors: + ErrorDialog(argparser.error[0], argparser.error[1]) Gtk.main_quit() sys.exit(1)