* src/RelLib.py, etc.: convert get_id to get_handle
svn: r3290
This commit is contained in:
ChangeLogMakefile.inaclocal.m4configure
doc
example
gramps-mdk.specgramps.specsrc
AddSpouse.pyArgHandler.pyBookmarks.pyChooseParents.pyDisplayModels.pyEditPerson.pyEditPlace.pyEditSource.pyEventEdit.pyFamilyView.pyFind.pyGenericFilter.pyGrampsCfg.pyGraphLayout.pyImageSelect.pyMakefile.inMarriage.pyMediaView.pyMergeData.pyPedView.pyPeopleModel.pyPeopleView.pyPlaceView.pyReadXML.pyRelLib.pyRelationship.pySelectChild.pySelectObject.pySort.pySourceView.pySources.pySubstKeywords.pyUtils.pyWitness.pyWriteXML.py
calendars
data
docgen
gramps_main.pyplugins
AncestorChart.pyAncestorChart2.pyAncestorReport.pyAncestors.pyBookReport.pyChangeTypes.pyCheck.pyCountAncestors.pyCustomBookText.pyDesGraph.pyDesbrowser.pyDescendReport.pyDetAncestralReport.pyDetDescendantReport.pyEventCmp.pyFamilyGroup.pyFanChart.pyFilterEditor.pyFtmStyleAncestors.pyFtmStyleDescendants.pyGraphViz.pyIndivComplete.pyIndivSummary.pyMakefile.inMerge.pyPartition.pyPatchNames.pyReadGedcom.pyRelCalc.pyRelGraph.pyReorderIds.pySimpleBookTitle.pySoundGen.pySummary.pyTimeLine.pyVerify.pyWebPage.pyWriteCD.pyWriteFtree.pyWriteGedcom.pyWritePkg.pyrel_de.pyrel_hu.pyrel_it.pyrel_ru.py
po
@ -50,7 +50,7 @@ class CountAncestors:
|
||||
})
|
||||
thisgen = []
|
||||
allgen = []
|
||||
thisgen.append(person.get_id())
|
||||
thisgen.append(person.get_handle())
|
||||
title = _("Number of ancestors of \"%s\" by generation") % person.get_primary_name().get_name()
|
||||
text = text + title + ':\n'
|
||||
thisgensize = 1
|
||||
@ -66,17 +66,17 @@ class CountAncestors:
|
||||
text = text + _("Generation %d has %d individuals.\n") % (gen, thisgensize)
|
||||
temp = thisgen
|
||||
thisgen = []
|
||||
for person_id in temp:
|
||||
person = database.try_to_find_person_from_id(person_id)
|
||||
family_id = person.get_main_parents_family_id()
|
||||
if family_id:
|
||||
family = database.find_family_from_id(family_id)
|
||||
father_id = family.get_father_id()
|
||||
mother_id = family.get_mother_id()
|
||||
if father_id:
|
||||
thisgen.append(father_id)
|
||||
if mother_id:
|
||||
thisgen.append(mother_id)
|
||||
for person_handle in temp:
|
||||
person = database.try_to_find_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = database.find_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
if father_handle:
|
||||
thisgen.append(father_handle)
|
||||
if mother_handle:
|
||||
thisgen.append(mother_handle)
|
||||
allgen = allgen + thisgen
|
||||
|
||||
text = text + _("Total ancestors in generations %d to -1 is %d.\n") % (gen, len(allgen))
|
||||
|
Reference in New Issue
Block a user