Relationship fix
svn: r2699
This commit is contained in:
parent
144632a850
commit
7d22d49f70
@ -1,3 +1,9 @@
|
|||||||
|
2004-01-23 Alex Roitman <shura@alex.neuro.umn.edu>
|
||||||
|
* src/Relationship.py: Check if we run out of defined levels.
|
||||||
|
|
||||||
|
2004-01-23 Tino Meinen <a.t.meinen@chello.nl>
|
||||||
|
* src/po/nl.po: Translation for 1.0.0-RC.
|
||||||
|
|
||||||
2004-01-22 Don Allingham <dallingham@users.sourceforge.net>
|
2004-01-22 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
* src/grampslib.i: same fixes as grampslib_wrap.c
|
* src/grampslib.i: same fixes as grampslib_wrap.c
|
||||||
* src/plugins/RelCalc.py: use preferred name format
|
* src/plugins/RelCalc.py: use preferred name format
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Gramps - a GTK+/GNOME based genealogy program
|
# Gramps - a GTK+/GNOME based genealogy program
|
||||||
#
|
#
|
||||||
# Copyright (C) 2003 Donald N. Allingham
|
# Copyright (C) 2003-2004 Donald N. Allingham
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
# it under the terms of the GNU General Public License as published by
|
# it under the terms of the GNU General Public License as published by
|
||||||
@ -18,6 +18,8 @@
|
|||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# $Id$
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
@ -164,33 +166,63 @@ def apply_filter(person,index,plist,pmap):
|
|||||||
apply_filter(family.getMother(),index+1,plist,pmap)
|
apply_filter(family.getMother(),index+1,plist,pmap)
|
||||||
|
|
||||||
def get_cousin(level,removed):
|
def get_cousin(level,removed):
|
||||||
|
if removed > len(_removed_level)-1 or level>len(_level_name)-1:
|
||||||
|
return "distant relative"
|
||||||
|
else:
|
||||||
return "%s cousin%s" % (_level_name[level],_removed_level[removed])
|
return "%s cousin%s" % (_level_name[level],_removed_level[removed])
|
||||||
|
|
||||||
def get_parents(level):
|
def get_parents(level):
|
||||||
|
if level>len(_parents_level)-1:
|
||||||
|
return "distant ancestors"
|
||||||
|
else:
|
||||||
return _parents_level[level]
|
return _parents_level[level]
|
||||||
|
|
||||||
def get_father(level):
|
def get_father(level):
|
||||||
|
if level>len(_father_level)-1:
|
||||||
|
return "distant ancestor"
|
||||||
|
else:
|
||||||
return _father_level[level]
|
return _father_level[level]
|
||||||
|
|
||||||
def get_son(level):
|
def get_son(level):
|
||||||
|
if level>len(_son_level)-1:
|
||||||
|
return "distant descendant"
|
||||||
|
else:
|
||||||
return _son_level[level]
|
return _son_level[level]
|
||||||
|
|
||||||
def get_mother(level):
|
def get_mother(level):
|
||||||
|
if level>len(_mother_level)-1:
|
||||||
|
return "distant ancestor"
|
||||||
|
else:
|
||||||
return _mother_level[level]
|
return _mother_level[level]
|
||||||
|
|
||||||
def get_daughter(level):
|
def get_daughter(level):
|
||||||
|
if level>len(_daughter_level)-1:
|
||||||
|
return "distant descendant"
|
||||||
|
else:
|
||||||
return _daughter_level[level]
|
return _daughter_level[level]
|
||||||
|
|
||||||
def get_aunt(level):
|
def get_aunt(level):
|
||||||
|
if level>len(_sister_level)-1:
|
||||||
|
return "distant ancestor"
|
||||||
|
else:
|
||||||
return _sister_level[level]
|
return _sister_level[level]
|
||||||
|
|
||||||
def get_uncle(level):
|
def get_uncle(level):
|
||||||
|
if level>len(_brother_level)-1:
|
||||||
|
return "distant ancestor"
|
||||||
|
else:
|
||||||
return _brother_level[level]
|
return _brother_level[level]
|
||||||
|
|
||||||
def get_nephew(level):
|
def get_nephew(level):
|
||||||
|
if level>len(_nephew_level)-1:
|
||||||
|
return "distant descendant"
|
||||||
|
else:
|
||||||
return _nephew_level[level]
|
return _nephew_level[level]
|
||||||
|
|
||||||
def get_niece(level):
|
def get_niece(level):
|
||||||
|
if level>len(_niece_level)-1:
|
||||||
|
return "distant descendant"
|
||||||
|
else:
|
||||||
return _niece_level[level]
|
return _niece_level[level]
|
||||||
|
|
||||||
def is_spouse(orig,other):
|
def is_spouse(orig,other):
|
||||||
|
Loading…
Reference in New Issue
Block a user