* src/gramps.glade: remove name display options

* src/GrampsCfg.py: remove name displaying functions
* src/Makefile.am: add NameDisplay.py to list
* src/NameDisplay.py: New name displaying class
* src/Utils.py: use new NameDisplay class
* src/AddSpouse.py: use new NameDisplay class
* src/AddrEdit.py: use new NameDisplay class
* src/Bookmarks.py: use new NameDisplay class
* src/ChooseParents.py: use new NameDisplay class
* src/DisplayModels.py: use new NameDisplay class
* src/EditPerson.py: use new NameDisplay class
* src/EditPlace.py: use new NameDisplay class
* src/EditSource.py: use new NameDisplay class
* src/FamilyView.py: use new NameDisplay class
* src/GenericFilter.py: use new NameDisplay class
* src/ImageSelect.py: use new NameDisplay class
* src/Marriage.py: use new NameDisplay class
* src/MergeData.py: use new NameDisplay class
* src/NameEdit.py: use new NameDisplay class
* src/PedView.py: use new NameDisplay class
* src/PeopleModel.py: use new NameDisplay class
* src/ReadGedcom.py: use new NameDisplay class
* src/Report.py: use new NameDisplay class
* src/SelectChild.py: use new NameDisplay class
* src/SubstKeywords.py: use new NameDisplay class
* src/Witness.py: use new NameDisplay class
* src/WriteGedcom.py: use new NameDisplay class
* src/gramps_main.py: use new NameDisplay class
* src/plugins/Desbrowser.py: use new NameDisplay class
* src/plugins/Merge.py: use new NameDisplay class
* src/plugins/RelCalc.py: use new NameDisplay class


svn: r3852
This commit is contained in:
Don Allingham
2005-01-01 04:27:15 +00:00
parent 1432e9e8cd
commit 63d7153857
31 changed files with 216 additions and 236 deletions

View File

@@ -47,6 +47,7 @@ import Utils
import GrampsCfg
import Sources
import ImageSelect
import NameDisplay
from gettext import gettext as _
@@ -74,6 +75,7 @@ class EditPlace:
self.win_key = place.get_handle()
else:
self.win_key = self
self.name_display = NameDisplay.displayer.display
self.place = place
self.db = parent.db
self.child_windows = {}
@@ -501,7 +503,7 @@ class EditPlace:
t = _("%s [%s]: event %s\n")
for e in pevent:
msg = msg + ( t % (GrampsCfg.get_nameof()(e[0]),e[0].get_handle(),_(e[1].get_name())))
msg = msg + ( t % (self.name_display(e[0]),e[0].get_handle(),_(e[1].get_name())))
if len(fevent) > 0:
any = 1
@@ -514,12 +516,12 @@ class EditPlace:
mother = e[0].get_mother_handle()
if father and mother:
fname = _("%(father)s and %(mother)s") % {
"father" : GrampsCfg.get_nameof()(father),
"mother" : GrampsCfg.get_nameof()(mother) }
"father" : self.name_display(father),
"mother" : self.name_display(mother) }
elif father:
fname = "%s" % GrampsCfg.get_nameof()(father)
fname = self.name_display(father)
else:
fname = "%s" % GrampsCfg.get_nameof()(mother)
fname = self.name_display(mother)
msg = msg + ( t % (fname,e[0].get_handle(),_(e[1].get_name())))