2007-06-17 Alex Roitman <shura@gramps-project.org>
* src/GrampsCfg.py (NameFormatEditDlg.cb_format_changed): Catch exception when format string is invalid. svn: r8571
This commit is contained in:
parent
d8a6684c96
commit
3ad774be3d
@ -1,3 +1,7 @@
|
|||||||
|
2007-06-17 Alex Roitman <shura@gramps-project.org>
|
||||||
|
* src/GrampsCfg.py (NameFormatEditDlg.cb_format_changed): Catch
|
||||||
|
exception when format string is invalid.
|
||||||
|
|
||||||
2007-06-16 Alex Roitman <shura@gramps-project.org>
|
2007-06-16 Alex Roitman <shura@gramps-project.org>
|
||||||
* src/gramps.py (run): Catch SystemExit exception.
|
* src/gramps.py (run): Catch SystemExit exception.
|
||||||
* src/ArgHandler.py: Use sys.exit() for bailing out.
|
* src/ArgHandler.py: Use sys.exit() for bailing out.
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2000-2006 Donald N. Allingham
|
# Copyright (C) 2000-2007 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -610,8 +610,12 @@ class NameFormatEditDlg:
|
|||||||
return (self.response, self.fmt_name, self.fmt_str)
|
return (self.response, self.fmt_name, self.fmt_str)
|
||||||
|
|
||||||
def cb_format_changed(self,obj):
|
def cb_format_changed(self,obj):
|
||||||
t = (_nd.format_str(self.name,obj.get_text()))
|
try:
|
||||||
self.examplelabel.set_text('<span weight="bold" style="italic">%s</span>' % t)
|
t = (_nd.format_str(self.name,obj.get_text()))
|
||||||
|
except ValueError, msg:
|
||||||
|
t = _("Invalid format string: %s") % msg
|
||||||
|
self.examplelabel.set_text(
|
||||||
|
'<span weight="bold" style="italic">%s</span>' % t)
|
||||||
self.examplelabel.set_use_markup(True)
|
self.examplelabel.set_use_markup(True)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user