* src/plugins/rel_da.py: Convert to new interface. Add to CVS.
* src/plugins/rel_fi.py: Convert to new interface. Add to CVS. * src/plugins/rel_fr.py: Convert to new interface. Add to CVS. * src/plugins/rel_no.py: Convert to new interface. Add to CVS. * src/plugins/rel_sv.py: Convert to new interface. Add to CVS. * src/plugins/Makefile.am: Ship new files. * src/Relationship.py (apply_filter): Keep gender info of all member in the relationship chain, not just number of generations; (is_spouse): correctly compare handles; (get_relationship_distance, get_relationship, get_grandparents_string): correctly use apply_filter. * src/plugins/rel_it.py (get_relationship): Correctly use apply_filter. * src/plugins/rel_hu.py (get_relationship): Correctly use apply_filter. * src/plugins/rel_de.py (is_spouse): Remove function; (get_relationship): Correctly use apply_filter. * src/plugins/rel_ru.py (is_spouse): Remove function; (get_relationship): Correctly use apply_filter. svn: r3452
This commit is contained in:
@@ -21,9 +21,7 @@
|
||||
|
||||
# $Id$
|
||||
|
||||
#
|
||||
# Written by Alex Roitman, largely based on Relationship.py by Don Allingham.
|
||||
#
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@@ -195,18 +193,6 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
else:
|
||||
return _niece_level[level]
|
||||
|
||||
def is_spouse(self,orig,other):
|
||||
for f in orig.get_family_handle_list():
|
||||
family = self.db.get_family_from_handle(f)
|
||||
if family:
|
||||
if other == family.get_father_handle() or other == family.get_mother_handle():
|
||||
return 1
|
||||
else:
|
||||
return 0
|
||||
return 0
|
||||
|
||||
|
||||
|
||||
def get_relationship(self,orig_person,other_person):
|
||||
"""
|
||||
Returns a string representing the relationshp between the two people,
|
||||
@@ -233,6 +219,9 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
else:
|
||||
return ("",[])
|
||||
|
||||
firstRel = len(firstRel)
|
||||
secondRel = len(secondRel)
|
||||
|
||||
if firstRel == 0:
|
||||
if secondRel == 0:
|
||||
return ('',common)
|
||||
|
||||
Reference in New Issue
Block a user