2006-06-14 Alex Roitman <shura@gramps-project.org>

* src/NameDisplay.py: Factor out commont code.
	* src/Editors/_EditName.py (_setup_fields): Remove Default item.
	* src/RelLib/_Name.py (Name.DEF): Replace with CUSTOM, use LNFN in
	place of previous DEF.
	* src/GrampsCfg.py (add_name_panel): Add Name Display panel.
	* src/GrampsDb/_ReadXML.py (stop_name): Properly set name type;
	do not set conf attribute on attr, addr, and event.



svn: r6889
This commit is contained in:
Alex Roitman
2006-06-14 20:20:39 +00:00
parent 18aa102799
commit 5b113d9558
7 changed files with 108 additions and 94 deletions

View File

@@ -77,7 +77,8 @@ class EditName(EditSecondary):
Utils.bold_label(self.general_label)
def _post_init(self):
if self.original_group_as and self.original_group_as != self.obj.get_surname():
if self.original_group_as and \
(self.original_group_as != self.obj.get_surname()):
self.group_over.set_active(True)
def _connect_signals(self):
@@ -99,18 +100,20 @@ class EditName(EditSecondary):
self.top.get_widget('sort_as'),
self.obj.set_sort_as,
self.obj.get_sort_as,
[(_('Default (based on locale)'),RelLib.Name.DEF),
(_('Given name Family name'), RelLib.Name.FNLN),
(_('Family name Given Name'), RelLib.Name.LNFN)],
[(_('Given name Family name'), RelLib.Name.FNLN),
(_('Family name Given Name Patronymic'), RelLib.Name.LNFN),
(_('Custom'), RelLib.Name.CUSTOM),
],
self.db.readonly)
self.display_as = MonitoredMenu(
self.top.get_widget('display_as'),
self.obj.set_display_as,
self.obj.get_display_as,
[(_('Default (based on locale)'),RelLib.Name.DEF),
(_('Given name Family name'), RelLib.Name.FNLN),
(_('Family name Given Name'), RelLib.Name.LNFN)],
[(_('Given name Family name'), RelLib.Name.FNLN),
(_('Family name Given Name Patronymic'), RelLib.Name.LNFN),
(_('Custom'), RelLib.Name.CUSTOM),
],
self.db.readonly)
self.given_field = MonitoredEntry(