* 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 e350d5c596
commit 6b2bf53b49
31 changed files with 216 additions and 236 deletions

View File

@ -43,6 +43,7 @@ import gnome
#-------------------------------------------------------------------------
import const
import GrampsMime
import NameDisplay
import Date
#-------------------------------------------------------------------------
@ -94,29 +95,6 @@ def wasHistory_broken():
# string if the person is None
#
#-------------------------------------------------------------------------
def phonebook_name(person):
if person:
return person.get_primary_name().get_name()
else:
return u''
def phonebook_upper_name(person):
if person:
return person.get_primary_name().get_upper_name()
else:
return u''
def normal_name(person):
if person:
return person.get_primary_name().get_regular_name()
else:
return u''
def upper_name(person):
if person:
return person.get_primary_name().get_regular_upper_name()
else:
return u''
def family_name(family,db):
"""Builds a name for the family from the parents names"""
@ -125,13 +103,13 @@ def family_name(family,db):
father = db.get_person_from_handle(father_handle)
mother = db.get_person_from_handle(mother_handle)
if father and mother:
fname = father.get_primary_name().get_name()
mname = mother.get_primary_name().get_name()
fname = NameDisplay.displayer.display(father)
mname = NameDisplay.displayer.display(mother)
name = _("%s and %s") % (fname,mname)
elif father:
name = father.get_primary_name().get_name()
name = NameDisplay.displayer.display(father)
else:
name = mother.get_primary_name().get_name()
name = NameDisplay.displayer.display(mother)
return name
def family_upper_name(family,db):