display error messages correctly

svn: r21014
This commit is contained in:
Doug Blank 2013-01-06 21:40:19 +00:00
parent 642f837658
commit 7dd022bddf
2 changed files with 6 additions and 4 deletions

View File

@ -181,10 +181,10 @@ class ErrorDialog(Gtk.MessageDialog):
flags=Gtk.DialogFlags.MODAL, flags=Gtk.DialogFlags.MODAL,
type=Gtk.MessageType.ERROR, type=Gtk.MessageType.ERROR,
buttons=Gtk.ButtonsType.CLOSE) buttons=Gtk.ButtonsType.CLOSE)
self.set_markup('<span weight="bold" size="larger">%s</span>' % msg1) self.set_markup('<span weight="bold" size="larger">%s</span>' % str(msg1))
self.format_secondary_text(msg2) self.format_secondary_text(msg2)
self.set_icon(ICON) self.set_icon(ICON)
self.set_title("%s - Gramps" % msg1) self.set_title("%s - Gramps" % str(msg1))
self.show() self.show()
self.run() self.run()
self.destroy() self.destroy()

View File

@ -287,12 +287,14 @@ def __startgramps(errors, argparser):
from .dialog import ErrorDialog from .dialog import ErrorDialog
#handle first existing errors in GUI fashion #handle first existing errors in GUI fashion
if errors: if errors:
ErrorDialog(errors[0], errors[1]) for error in errors:
ErrorDialog(error[0], error[1])
Gtk.main_quit() Gtk.main_quit()
sys.exit(1) sys.exit(1)
if argparser.errors: 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() Gtk.main_quit()
sys.exit(1) sys.exit(1)