* 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

@ -40,7 +40,6 @@ import gnome
#-------------------------------------------------------------------------
import const
import GrampsCfg
import Utils
import AutoComp
import ListModel
@ -49,6 +48,7 @@ import ImageSelect
import DateHandler
import Sources
import GrampsGconfKeys
import NameDisplay
from QuestionDialog import QuestionDialog, WarningDialog, SaveDialog
from gettext import gettext as _
@ -137,8 +137,8 @@ class Marriage:
father = self.db.get_person_from_handle(fid)
mother = self.db.get_person_from_handle(mid)
self.title = _("%s and %s") % (GrampsCfg.get_nameof()(father),
GrampsCfg.get_nameof()(mother))
self.title = _("%s and %s") % (NameDisplay.displayer.display(father),
NameDisplay.displayer.display(mother))
Utils.set_title_label(self.top,self.title)
@ -734,12 +734,13 @@ class Marriage:
father = self.db.get_person_from_handle(father_handle)
mother = self.db.get_person_from_handle(mother_handle)
if father and mother:
name = _("%s and %s") % (father.get_primary_name().get_name(),
mother.get_primary_name().get_name())
name = _("%s and %s") % (
NameDisplay.displayer.display(father),
NameDisplay.displayer.display(mother))
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)
AttrEdit.AttributeEditor(self,attr,name,const.familyAttributes,
self.attr_edit_callback)
@ -755,12 +756,13 @@ class Marriage:
father = self.db.get_person_from_handle(father_handle)
mother = self.db.get_person_from_handle(mother_handle)
if father and mother:
name = _("%s and %s") % (father.get_primary_name().get_name(),
mother.get_primary_name().get_name())
name = _("%s and %s") % (
NameDisplay.displayer.display(father),
NameDisplay.displayer.display(mother))
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)
AttrEdit.AttributeEditor(self,None,name,const.familyAttributes,
self.attr_edit_callback)