* src/Relationship.py: many improvements and bug fixes
	* src/plugins/all_relations.py: bug fixes
	* src/plugins/RelCalc.py: use new API
	* src/plugins/rel_nl.py: finished, removed comment
	* src/plugins/rel_it.py: finished
	* src/plugins/rel_pl.py: move old code here away from Relationship
	* src/plugins/rel_pt.py: import gen.lib



svn: r9367
This commit is contained in:
Benny Malengier
2007-11-18 23:39:14 +00:00
parent 690b0bdb3c
commit 3438c8973d
8 changed files with 611 additions and 194 deletions

View File

@@ -490,6 +490,33 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
return (firstRel,secondRel,common,firstList,secondList)
def __apply_filter_old(self, db, person, rel_str, plist, pmap, depth=1):
""" DEPRECATED -- DO NOT USE
copied here from Relationship.py as no longer needed elsewhere
"""
if person == None or depth > MAX_DEPTH:
return
depth += 1
plist.append(person.handle)
pmap[person.handle] = rel_str # ?? this overwrites if person is double!
family_handle = person.get_main_parents_family_handle()
try:
if family_handle:
family = db.get_family_from_handle(family_handle)
fhandle = family.father_handle
if fhandle:
father = db.get_person_from_handle(fhandle)
self.__apply_filter_old(db, father, rel_str+'f', plist, pmap,
depth)
mhandle = family.mother_handle
if mhandle:
mother = db.get_person_from_handle(mhandle)
self.__apply_filter_old(db, mother, rel_str+'m', plist, pmap,
depth)
except:
return
def get_relationship(self,db,orig_person,other_person):
"""
Returns a string representing the relationshp between the two people,