* PeopleModel.py: simplify model interface
* EditPerson.py: get_family_from_handle fixes * EditSource.py: get_family_from_handle fixes * GraphLayout.py: get_family_from_handle fixes * ImageSelect.py: get_family_from_handle fixes * MediaView.py: get_family_from_handle fixes * MergeData.py: get_family_from_handle fixes * PlaceView.py: get_family_from_handle fixes * ReadXML.py: get_family_from_handle fixes * RelLib.py: get_family_from_handle fixes * Relationship.py: get_family_from_handle fixes * SelectChild.py: get_family_from_handle fixes * SourceView.py: get_family_from_handle fixes * SubstKeywords.py: get_family_from_handle fixes * WriteXML.py: get_family_from_handle fixes * gramps_main.py: get_family_from_handle fixes * plugins/AncestorChart.py: get_family_from_handle fixes * plugins/AncestorChart2.py: get_family_from_handle fixes * plugins/AncestorReport.py: get_family_from_handle fixes * plugins/Ancestors.py: get_family_from_handle fixes * plugins/Check.py: get_family_from_handle fixes * plugins/CountAncestors.py: get_family_from_handle fixes * plugins/Desbrowser.py: get_family_from_handle fixes * plugins/DescendReport.py: get_family_from_handle fixes * plugins/DetAncestralReport.py: get_family_from_handle fixes * plugins/DetDescendantReport.py: get_family_from_handle fixes * plugins/FamilyGroup.py: get_family_from_handle fixes * plugins/FanChart.py: get_family_from_handle fixes * plugins/FtmStyleAncestors.py: get_family_from_handle fixes * plugins/FtmStyleDescendants.py: get_family_from_handle fixes * plugins/GraphViz.py: get_family_from_handle fixes * plugins/IndivComplete.py: get_family_from_handle fixes * plugins/IndivSummary.py: get_family_from_handle fixes * plugins/Merge.py: get_family_from_handle fixes * plugins/RelGraph.py: get_family_from_handle fixes * plugins/Verify.py: get_family_from_handle fixes * plugins/WebPage.py: get_family_from_handle fixes * plugins/WriteCD.py: get_family_from_handle fixes * plugins/WritePkg.py: get_family_from_handle fixes * plugins/rel_de.py: get_family_from_handle fixes * plugins/rel_hu.py: get_family_from_handle fixes * plugins/rel_ru.py: get_family_from_handle fixes svn: r3443
This commit is contained in:
parent
b190a6ffc4
commit
bfc08ca83a
45
ChangeLog
45
ChangeLog
@ -1,3 +1,48 @@
|
||||
2004-08-19 Don Allingham <dallingham@users.sourceforge.net>
|
||||
* PeopleModel.py: simplify model interface
|
||||
* AddSpouse.py: get_family_from_handle fixes
|
||||
* EditPerson.py: get_family_from_handle fixes
|
||||
* EditSource.py: get_family_from_handle fixes
|
||||
* GraphLayout.py: get_family_from_handle fixes
|
||||
* ImageSelect.py: get_family_from_handle fixes
|
||||
* MediaView.py: get_family_from_handle fixes
|
||||
* MergeData.py: get_family_from_handle fixes
|
||||
* PlaceView.py: get_family_from_handle fixes
|
||||
* ReadXML.py: get_family_from_handle fixes
|
||||
* RelLib.py: get_family_from_handle fixes
|
||||
* Relationship.py: get_family_from_handle fixes
|
||||
* SelectChild.py: get_family_from_handle fixes
|
||||
* SourceView.py: get_family_from_handle fixes
|
||||
* SubstKeywords.py: get_family_from_handle fixes
|
||||
* WriteXML.py: get_family_from_handle fixes
|
||||
* gramps_main.py: get_family_from_handle fixes
|
||||
* plugins/AncestorChart.py: get_family_from_handle fixes
|
||||
* plugins/AncestorChart2.py: get_family_from_handle fixes
|
||||
* plugins/AncestorReport.py: get_family_from_handle fixes
|
||||
* plugins/Ancestors.py: get_family_from_handle fixes
|
||||
* plugins/Check.py: get_family_from_handle fixes
|
||||
* plugins/CountAncestors.py: get_family_from_handle fixes
|
||||
* plugins/Desbrowser.py: get_family_from_handle fixes
|
||||
* plugins/DescendReport.py: get_family_from_handle fixes
|
||||
* plugins/DetAncestralReport.py: get_family_from_handle fixes
|
||||
* plugins/DetDescendantReport.py: get_family_from_handle fixes
|
||||
* plugins/FamilyGroup.py: get_family_from_handle fixes
|
||||
* plugins/FanChart.py: get_family_from_handle fixes
|
||||
* plugins/FtmStyleAncestors.py: get_family_from_handle fixes
|
||||
* plugins/FtmStyleDescendants.py: get_family_from_handle fixes
|
||||
* plugins/GraphViz.py: get_family_from_handle fixes
|
||||
* plugins/IndivComplete.py: get_family_from_handle fixes
|
||||
* plugins/IndivSummary.py: get_family_from_handle fixes
|
||||
* plugins/Merge.py: get_family_from_handle fixes
|
||||
* plugins/RelGraph.py: get_family_from_handle fixes
|
||||
* plugins/Verify.py: get_family_from_handle fixes
|
||||
* plugins/WebPage.py: get_family_from_handle fixes
|
||||
* plugins/WriteCD.py: get_family_from_handle fixes
|
||||
* plugins/WritePkg.py: get_family_from_handle fixes
|
||||
* plugins/rel_de.py: get_family_from_handle fixes
|
||||
* plugins/rel_hu.py: get_family_from_handle fixes
|
||||
* plugins/rel_ru.py: get_family_from_handle fixes
|
||||
|
||||
2004-08-19 Tim Waugh <twaugh@redhat.com>
|
||||
* src/RelLib.py (probably_alive): Use get_family_from_handle instead
|
||||
of find_family_from_handle.
|
||||
|
@ -246,7 +246,7 @@ class AddSpouse:
|
||||
|
||||
# don't do anything if the marriage already exists
|
||||
for f in self.person.get_family_handle_list():
|
||||
fam = self.db.find_family_from_handle(f)
|
||||
fam = self.db.get_family_from_handle(f)
|
||||
if spouse_id == fam.get_mother_handle() or \
|
||||
spouse_id == fam.get_father_handle():
|
||||
Utils.destroy_passed_object(obj)
|
||||
|
@ -565,7 +565,7 @@ class EditPerson:
|
||||
if fam not in flist:
|
||||
flist.append(fam)
|
||||
for fam_id in flist:
|
||||
fam = self.db.find_family_from_handle(fam_id)
|
||||
fam = self.db.get_family_from_handle(fam_id)
|
||||
if fam == None:
|
||||
continue
|
||||
f_id = fam.get_father_handle()
|
||||
|
@ -392,7 +392,7 @@ class DelSrcQuery:
|
||||
|
||||
for p_id in self.db.get_family_handles():
|
||||
commit = 0
|
||||
p = self.db.find_family_from_handle(p_id)
|
||||
p = self.db.get_family_from_handle(p_id)
|
||||
for v_id in p.get_event_list():
|
||||
v = self.db.find_event_from_handle(v_id)
|
||||
if v:
|
||||
|
@ -56,7 +56,7 @@ class DescendLine(GraphLayout):
|
||||
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
for child_handle in family.get_child_handle_list():
|
||||
self.space_for(child_handle,level+1.0,pos)
|
||||
pos = pos + max(self.depth(child_handle),1)
|
||||
@ -67,7 +67,7 @@ class DescendLine(GraphLayout):
|
||||
def depth(self,person_handle,val=0):
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
clist = family.get_child_handle_list()
|
||||
val = val + len(clist)
|
||||
for child_handle in clist:
|
||||
|
@ -1063,7 +1063,7 @@ class GlobalMediaProperties:
|
||||
self.refmodel.add([_("Person"),p.get_handle(),GrampsCfg.get_nameof()(p)])
|
||||
any = 1
|
||||
for key in self.db.get_family_handles():
|
||||
p = self.db.find_family_from_handle(key)
|
||||
p = self.db.get_family_from_handle(key)
|
||||
for o in p.get_media_list():
|
||||
if o.get_reference_handle() == self.object.get_handle():
|
||||
self.refmodel.add([_("Family"),p.get_handle(),Utils.family_name(p,self.db)])
|
||||
@ -1183,7 +1183,7 @@ class DeleteMediaQuery:
|
||||
self.db.commit_person(p,trans)
|
||||
|
||||
for fid in self.db.get_family_handles():
|
||||
p = self.db.find_family_from_handle(fid)
|
||||
p = self.db.get_family_from_handle(fid)
|
||||
nl = []
|
||||
change = 0
|
||||
for photo in p.get_media_list():
|
||||
|
@ -308,7 +308,7 @@ class MediaView:
|
||||
|
||||
def is_object_used(self,mobj):
|
||||
for family_handle in self.db.get_family_handles():
|
||||
p = self.db.find_family_from_handle(family_handle)
|
||||
p = self.db.get_family_from_handle(family_handle)
|
||||
for o in p.get_media_list():
|
||||
if o.get_reference_handle() == mobj.get_handle():
|
||||
return 1
|
||||
|
@ -362,7 +362,7 @@ class MergePeople:
|
||||
mother = self.p1.get_handle()
|
||||
|
||||
for myfamily_handle in self.db.get_family_handles():
|
||||
myfamily = self.db.find_family_from_handle(myfamily_handle)
|
||||
myfamily = self.db.get_family_from_handle(myfamily_handle)
|
||||
if myfamily.get_father_handle() == father and myfamily.get_mother_handle() == mother:
|
||||
return myfamily
|
||||
return None
|
||||
|
@ -90,7 +90,6 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
|
||||
maps = self.db.get_people_view_maps()
|
||||
if maps[0] != None and len(maps[0]) != 0:
|
||||
self.top_iter2path = maps[0]
|
||||
self.top_path2iter = maps[1]
|
||||
self.iter2path = maps[2]
|
||||
self.path2iter = maps[3]
|
||||
@ -125,8 +124,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
return 0
|
||||
|
||||
def rebuild_data(self):
|
||||
self.top_iter2path = {}
|
||||
self.top_path2iter = {}
|
||||
self.top_path2iter = []
|
||||
self.iter2path = {}
|
||||
self.path2iter = {}
|
||||
self.sname_sub = {}
|
||||
@ -146,12 +144,10 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
else:
|
||||
self.sname_sub[surname] = [person_handle]
|
||||
|
||||
sval = 0
|
||||
name_list = self.db.get_surname_list()
|
||||
for name in name_list:
|
||||
if self.sname_sub.has_key(name):
|
||||
self.top_iter2path[name] = (sval,)
|
||||
self.top_path2iter[sval] = name
|
||||
self.top_path2iter.append(name)
|
||||
val = 0
|
||||
entries = self.sname_sub[name]
|
||||
entries.sort(self.byname)
|
||||
@ -160,11 +156,13 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
self.iter2path[person_handle] = tpl
|
||||
self.path2iter[tpl] = person_handle
|
||||
val += 1
|
||||
sval += 1
|
||||
self.db.set_people_view_maps(self.get_maps())
|
||||
|
||||
print self.sname_sub
|
||||
print self.top_path2iter
|
||||
|
||||
def get_maps(self):
|
||||
return (self.top_iter2path,
|
||||
return (None,
|
||||
self.top_path2iter,
|
||||
self.iter2path,
|
||||
self.path2iter,
|
||||
@ -184,7 +182,6 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
name_list = self.db.get_surname_list()
|
||||
for name in name_list:
|
||||
if self.sname_sub.has_key(name):
|
||||
self.top_iter2path[name] = (sval,)
|
||||
self.top_path2iter[sval] = name
|
||||
if name == surname:
|
||||
inscol = (sval,)
|
||||
@ -203,7 +200,7 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
column = val
|
||||
val += 1
|
||||
|
||||
col = self.top_iter2path[surname]
|
||||
col = self.top_path2iter.index(surname)
|
||||
mypath = (col[0],column)
|
||||
if need:
|
||||
self.row_inserted(inscol,self.get_iter(inscol))
|
||||
@ -224,11 +221,15 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
def on_get_path(self, node):
|
||||
'''returns the tree path (a tuple of indices at the various
|
||||
levels) for a particular node.'''
|
||||
if self.top_iter2path.has_key(node):
|
||||
return self.top_iter2path[node]
|
||||
else:
|
||||
try:
|
||||
return (self.top_path2iter.index(node),)
|
||||
except ValueError:
|
||||
(surname,index) = self.iter2path[node]
|
||||
return (self.top_iter2path[surname][0],index)
|
||||
return (self.top_path2iter.index(surname),index)
|
||||
except:
|
||||
print self.top_path2iter
|
||||
print node
|
||||
|
||||
|
||||
def on_get_column_type(self,index):
|
||||
"""The visibility column is a boolean, the weight column is an integer,
|
||||
@ -254,15 +255,15 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
if col == COLUMN_INT_ID:
|
||||
return iter
|
||||
elif col == COLUMN_BOLD:
|
||||
if self.top_iter2path.has_key(iter):
|
||||
if self.sname_sub.has_key(iter):
|
||||
return pango.WEIGHT_BOLD
|
||||
else:
|
||||
return pango.WEIGHT_NORMAL
|
||||
elif col == COLUMN_VIEW:
|
||||
if self.top_iter2path.has_key(iter):
|
||||
if self.sname_sub.has_key(iter):
|
||||
return self.top_visible.has_key(iter)
|
||||
return self.visible.has_key(iter)
|
||||
elif self.top_iter2path.has_key(iter):
|
||||
elif self.sname_sub.has_key(iter):
|
||||
if col == 0:
|
||||
return iter
|
||||
else:
|
||||
@ -285,10 +286,12 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
|
||||
def on_iter_next(self, node):
|
||||
'''returns the next node at this level of the tree'''
|
||||
if self.top_iter2path.has_key(node):
|
||||
path = self.top_iter2path[node]
|
||||
return self.top_path2iter.get(path[0]+1)
|
||||
else:
|
||||
try:
|
||||
path = self.top_path2iter.index(node)
|
||||
if path+1 == len(self.top_path2iter):
|
||||
return None
|
||||
return self.top_path2iter[path+1]
|
||||
except:
|
||||
(surname,val) = self.iter2path[node]
|
||||
return self.path2iter.get((surname,val+1))
|
||||
|
||||
@ -302,25 +305,26 @@ class PeopleModel(gtk.GenericTreeModel):
|
||||
def on_iter_has_child(self, node):
|
||||
'''returns true if this node has children'''
|
||||
if node == None:
|
||||
return len(self.top_iter2path)
|
||||
return len(self.sname_sub)
|
||||
if self.sname_sub.has_key(node) and len(self.sname_sub[node]) > 0:
|
||||
return gtk.TRUE
|
||||
return gtk.FALSE
|
||||
|
||||
def on_iter_n_children(self,node):
|
||||
if node == None:
|
||||
return len(self.top_iter2path)
|
||||
if self.top_iter2path.has_key(node):
|
||||
return len(self.sname_sub)
|
||||
try:
|
||||
return len(self.sname_sub[node])
|
||||
return 0
|
||||
except:
|
||||
return 0
|
||||
|
||||
def on_iter_nth_child(self,node,n):
|
||||
if node == None:
|
||||
return self.top_path2iter.get(n)
|
||||
path = self.top_iter2path.get(node)
|
||||
if path:
|
||||
return self.path2iter.get((node,n))
|
||||
else:
|
||||
try:
|
||||
path = self.top_path2iter.index(node)
|
||||
return self.path2iter[(node,n)]
|
||||
except:
|
||||
return None
|
||||
|
||||
def on_iter_parent(self, node):
|
||||
|
@ -201,7 +201,7 @@ class PlaceView:
|
||||
used = 1
|
||||
|
||||
for fid in self.parent.db.get_family_handles():
|
||||
f = self.parent.db.find_family_from_handle(fid)
|
||||
f = self.parent.db.get_family_from_handle(fid)
|
||||
event_list = []
|
||||
for e in f.get_event_list():
|
||||
event = self.parent.db.find_event_from_handle(e)
|
||||
|
@ -177,7 +177,7 @@ def importData(database, filename, callback=None,cl=0):
|
||||
# # File is lost => remove all references and the object itself
|
||||
# mobj = database.find_object_from_handle(NewMediaID)
|
||||
# for fid in database.get_family_handles():
|
||||
# p = database.find_family_from_handle(fid)
|
||||
# p = database.get_family_from_handle(fid)
|
||||
# nl = p.get_media_list()
|
||||
# for o in nl:
|
||||
# if o.get_reference() == mobj:
|
||||
|
@ -581,7 +581,7 @@ class Person(PrimaryObject,SourceNote):
|
||||
def parents_too_old (person, age_difference):
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = db.find_family_from_handle(family_handle)
|
||||
family = db.get_family_from_handle(family_handle)
|
||||
for parent_id in [family.get_father_handle(), family.get_mother_handle()]:
|
||||
if not parent_id:
|
||||
continue
|
||||
@ -612,7 +612,7 @@ class Person(PrimaryObject,SourceNote):
|
||||
# As a last resort, trying seeing if their spouse's age gives
|
||||
# any clue.
|
||||
for family_handle in self.get_family_handle_list():
|
||||
family = db.find_family_from_handle(family_handle)
|
||||
family = db.get_family_from_handle(family_handle)
|
||||
for spouse_id in [family.get_father_handle(), family.get_mother_handle()]:
|
||||
if not spouse_id:
|
||||
continue
|
||||
|
@ -170,7 +170,7 @@ class RelationshipCalculator:
|
||||
pmap[person.get_handle()] = index
|
||||
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if family != None:
|
||||
father = self.db.get_person_from_handle(family.get_father_handle())
|
||||
mother = self.db.get_person_from_handle(family.get_mother_handle())
|
||||
@ -239,7 +239,7 @@ class RelationshipCalculator:
|
||||
|
||||
def is_spouse(self,orig,other):
|
||||
for f in orig.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(f)
|
||||
family = self.db.get_family_from_handle(f)
|
||||
if family:
|
||||
if other == family.get_father_handle() or other == family.get_mother_handle():
|
||||
return 1
|
||||
|
@ -186,7 +186,7 @@ class SelectChild:
|
||||
slist = {}
|
||||
for f in self.person.get_parent_family_handle_list():
|
||||
if f:
|
||||
family = self.db.find_family_from_handle(f[0])
|
||||
family = self.db.get_family_from_handle(f[0])
|
||||
if family.get_father_handle():
|
||||
slist[family.get_father_handle()] = 1
|
||||
elif family.get_mother_handle():
|
||||
|
@ -223,7 +223,7 @@ class SourceView:
|
||||
if sref.get_base_handle() == source.get_handle():
|
||||
return 1
|
||||
for p_id in self.parent.db.get_family_handles():
|
||||
p = self.parent.db.find_family_from_handle(p_id)
|
||||
p = self.parent.db.get_family_from_handle(p_id)
|
||||
for v_id in p.get_event_list():
|
||||
v = self.parent.db.find_event_from_handle(v_id)
|
||||
if v:
|
||||
|
@ -98,7 +98,7 @@ class SubstKeywords:
|
||||
|
||||
if person.get_family_handle_list():
|
||||
f_id = person.get_family_handle_list()[0]
|
||||
f = database.find_family_from_handle(f_id)
|
||||
f = database.get_family_from_handle(f_id)
|
||||
father_handle = f.get_father_handle()
|
||||
mother_handle = f.get_mother_handle()
|
||||
if father_handle == person_handle:
|
||||
|
@ -321,7 +321,7 @@ class XmlWriter:
|
||||
|
||||
familyList.sort ()
|
||||
for key in self.db.get_family_handles():
|
||||
family = self.db.find_family_from_handle(key)
|
||||
family = self.db.get_family_from_handle(key)
|
||||
if self.callback and count % delta == 0:
|
||||
self.callback(float(count)/float(total))
|
||||
count = count + 1
|
||||
|
@ -1241,7 +1241,7 @@ class Gramps:
|
||||
for family_handle in self.active_person.get_family_handle_list():
|
||||
if not family_handle:
|
||||
continue
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if self.active_person.get_handle() == family.get_father_handle():
|
||||
if family.get_mother_handle() == None:
|
||||
for child_handle in family.get_child_handle_list():
|
||||
@ -1264,7 +1264,7 @@ class Gramps:
|
||||
|
||||
for (family_handle,mrel,frel) in self.active_person.get_parent_family_handle_list():
|
||||
if family_handle:
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
family.remove_child_handle(self.active_person.get_handle())
|
||||
self.db.commit_family(family,trans)
|
||||
|
||||
|
@ -114,7 +114,7 @@ class AncestorChart:
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.filter(family.get_father_handle(),index*2)
|
||||
self.filter(family.get_mother_handle(),(index*2)+1)
|
||||
|
||||
|
@ -228,7 +228,7 @@ class AncestorChart:
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.filter(family.get_father_handle(),index*2)
|
||||
self.filter(family.get_mother_handle(),(index*2)+1)
|
||||
|
||||
|
@ -72,7 +72,7 @@ class AncestorReport(Report.Report):
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.filter(family.get_father_handle(),index*2,generation+1)
|
||||
self.filter(family.get_mother_handle(),(index*2)+1,generation+1)
|
||||
|
||||
|
@ -181,7 +181,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
|
||||
def family (self, family_handle, already_described):
|
||||
ret = []
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
if not family:
|
||||
return ret
|
||||
father_handle = family.get_father_handle ()
|
||||
@ -226,8 +226,8 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
people.extend (self.family (family_handle, already_described))
|
||||
|
||||
if thisgen > 2 and len (mfamily_handles):
|
||||
for self.gp in [self.database.find_family_from_handle(mfamily_handles[0]).get_father_handle (),
|
||||
self.database.find_family_from_handle(mfamily_handles[0]).get_mother_handle ()]:
|
||||
for self.gp in [self.database.get_family_from_handle(mfamily_handles[0]).get_father_handle (),
|
||||
self.database.get_family_from_handle(mfamily_handles[0]).get_mother_handle ()]:
|
||||
if self.gp:
|
||||
break
|
||||
|
||||
@ -249,8 +249,8 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
self.doc.start_paragraph ("AR-Heading")
|
||||
family_handles = pfamily_handles
|
||||
family_handles.extend (mfamily_handles)
|
||||
for self.gp in [self.database.find_family_from_handle(family_handles[0]).get_father_handle (),
|
||||
self.database.find_family_from_handle(family_handles[0]).get_mother_handle ()]:
|
||||
for self.gp in [self.database.get_family_from_handle(family_handles[0]).get_father_handle (),
|
||||
self.database.get_family_from_handle(family_handles[0]).get_mother_handle ()]:
|
||||
if self.gp:
|
||||
break
|
||||
|
||||
@ -272,13 +272,13 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
next_pfamily_handles = []
|
||||
next_mfamily_handles = []
|
||||
for family_handle in family_handles:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle ()
|
||||
father = self.database.get_person_from_handle(father_handle)
|
||||
if father:
|
||||
already_described.append (father_handle)
|
||||
father_family_handle = father.get_main_parents_family_handle ()
|
||||
father_family = self.database.find_family_from_handle(father_family_handle)
|
||||
father_family = self.database.get_family_from_handle(father_family_handle)
|
||||
if father_family:
|
||||
next_pfamily_handles.append (father_family_handle)
|
||||
|
||||
@ -287,7 +287,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
if mother:
|
||||
already_described.append (mother_handle)
|
||||
mother_family_handle = mother.get_main_parents_family_handle ()
|
||||
mother_family = self.database.find_family_from_handle(mother_family_handle)
|
||||
mother_family = self.database.get_family_from_handle(mother_family_handle)
|
||||
if mother_family:
|
||||
next_mfamily_handles.append (mother_family_handle)
|
||||
|
||||
@ -332,7 +332,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
from_family_father = from_family_mother = None
|
||||
|
||||
for family_handle in person.get_family_handle_list ():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
for partner_id in [family.get_father_handle (),
|
||||
family.get_mother_handle ()]:
|
||||
partner = self.database.get_person_from_handle(partner_id)
|
||||
@ -536,7 +536,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
|
||||
family_handle = person.get_main_parents_family_handle ()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
fathername = mothername = None
|
||||
father_handle = family.get_father_handle ()
|
||||
if father_handle:
|
||||
@ -681,7 +681,7 @@ class ComprehensiveAncestorsReport (Report.Report):
|
||||
first_marriage = 1
|
||||
ret = ''
|
||||
for family_handle in person.get_family_handle_list ():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
mother_handle = family.get_mother_handle ()
|
||||
mother = self.database.get_person_from_handle(mother_handle)
|
||||
for spouse_id in [family.get_father_handle (), mother_handle]:
|
||||
|
@ -94,7 +94,7 @@ class CheckIntegrity:
|
||||
def check_for_broken_family_links(self):
|
||||
self.broken_links = []
|
||||
for family_handle in self.db.get_family_handles():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
if father_handle:
|
||||
@ -233,7 +233,7 @@ class CheckIntegrity:
|
||||
|
||||
def cleanup_empty_families(self,automatic):
|
||||
for family_handle in self.db.get_family_handles():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if not family.get_father_handle() and not family.get_mother_handle():
|
||||
self.empty_family.append(family_handle)
|
||||
self.delete_empty_family(family_handle)
|
||||
@ -247,7 +247,7 @@ class CheckIntegrity:
|
||||
|
||||
def check_parent_relationships(self):
|
||||
for key in self.db.get_family_handles():
|
||||
family = self.db.find_family_from_handle(key)
|
||||
family = self.db.get_family_from_handle(key)
|
||||
mother_handle = family.get_mother_handle()
|
||||
father_handle = family.get_father_handle()
|
||||
if father_handle:
|
||||
@ -317,7 +317,7 @@ class CheckIntegrity:
|
||||
self.text.write(_("%d broken child/family links were found\n") % blink)
|
||||
for (person_handle,family_handle) in self.broken_links:
|
||||
person = self.db.get_person_from_handle(person_handle)
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
cn = person.get_primary_name().get_name()
|
||||
f = self.db.get_person_from_handle(family.get_father_handle())
|
||||
m = self.db.get_person_from_handle(family.get_mother_handle())
|
||||
@ -340,7 +340,7 @@ class CheckIntegrity:
|
||||
self.text.write(_("%d broken spouse/family links were found\n") % plink)
|
||||
for (person_handle,family_handle) in self.broken_parent_links:
|
||||
person = self.db.get_person_from_handle(person_handle)
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
cn = person.get_primary_name().get_name()
|
||||
f = self.db.get_person_from_handle(family.get_father_handle())
|
||||
m = self.db.get_person_from_handle(family.get_mother_handle())
|
||||
|
@ -70,7 +70,7 @@ class CountAncestors:
|
||||
person = database.get_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = database.find_family_from_handle(family_handle)
|
||||
family = database.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
if father_handle:
|
||||
|
@ -123,7 +123,7 @@ class DesBrowse:
|
||||
self.model.set(item_id,1,person_handle)
|
||||
prev_id = None
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
for child_handle in family.get_child_handle_list():
|
||||
prev_id = self.add_to_tree(item_id,prev_id,child_handle)
|
||||
return item_id
|
||||
|
@ -127,7 +127,7 @@ class DescendantReport:
|
||||
|
||||
childlist = []
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
for child_handle in family.get_child_handle_list():
|
||||
childlist.append(child_handle)
|
||||
|
||||
|
@ -82,7 +82,7 @@ class DetAncestorReport(Report.Report):
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.filter(family.get_father_handle(),index*2)
|
||||
self.filter(family.get_mother_handle(),(index*2)+1)
|
||||
|
||||
@ -406,7 +406,7 @@ class DetAncestorReport(Report.Report):
|
||||
famList = person.get_family_handle_list()
|
||||
if len(famList) > 0:
|
||||
for fam_id in famList:
|
||||
fam = self.database.find_family_from_handle(fam_id)
|
||||
fam = self.database.get_family_from_handle(fam_id)
|
||||
buried = None
|
||||
if buried:
|
||||
date = buried.get_date_object().get_start_date()
|
||||
@ -445,7 +445,7 @@ class DetAncestorReport(Report.Report):
|
||||
"""
|
||||
ext_family_handle = person.get_main_parents_family_handle()
|
||||
if ext_family_handle:
|
||||
ext_family = self.database.find_family_from_handle(ext_family_handle)
|
||||
ext_family = self.database.get_family_from_handle(ext_family_handle)
|
||||
if ext_family.get_father_handle():
|
||||
father_obj = self.database.get_person_from_handle(ext_family.get_father_handle())
|
||||
father = father_obj.get_primary_name().get_regular_name()
|
||||
@ -497,7 +497,7 @@ class DetAncestorReport(Report.Report):
|
||||
fam_num= 0
|
||||
endOfSent= ""
|
||||
for fam_id in famList:
|
||||
fam = self.database.find_family_from_handle(fam_id)
|
||||
fam = self.database.get_family_from_handle(fam_id)
|
||||
fam_num= fam_num + 1
|
||||
spouse= ""
|
||||
t= ""
|
||||
@ -579,7 +579,7 @@ class DetAncestorReport(Report.Report):
|
||||
famList = mate.get_family_handle_list()
|
||||
if len(famList) > 0:
|
||||
for fam_id in famList:
|
||||
fam = self.database.find_family_from_handle(fam_id)
|
||||
fam = self.database.get_family_from_handle(fam_id)
|
||||
person= ""
|
||||
if mate.get_gender() == RelLib.Person.male:
|
||||
if fam.get_mother_handle():
|
||||
@ -680,7 +680,7 @@ class DetAncestorReport(Report.Report):
|
||||
rptOpt.listChildren == reportOptions.Yes and \
|
||||
len(person.get_family_handle_list()) > 0:
|
||||
family_handle = person.get_family_handle_list()[0]
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.write_children(family, rptOpt)
|
||||
|
||||
#if rptOpt.addImages == reportOptions.Yes:
|
||||
|
@ -87,9 +87,9 @@ class DetDescendantReport(Report.Report):
|
||||
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
for child_handle in family.get_child_handle_list():
|
||||
child = self.database.find_family_from_handle(child_handle)
|
||||
child = self.database.get_family_from_handle(child_handle)
|
||||
ix = max(self.map.keys())
|
||||
self.apply_filter(child_handle, ix+1, cur_gen+1)
|
||||
|
||||
@ -407,7 +407,7 @@ class DetDescendantReport(Report.Report):
|
||||
famList = person.get_family_handle_list()
|
||||
if len(famList):
|
||||
for fam_id in famList:
|
||||
fam = self.database.find_family_from_handle(fam_id)
|
||||
fam = self.database.get_family_from_handle(fam_id)
|
||||
buried = None
|
||||
if buried:
|
||||
date = buried.get_date_object().get_start_date()
|
||||
@ -447,7 +447,7 @@ class DetDescendantReport(Report.Report):
|
||||
"""
|
||||
ext_family_handle = person.get_main_parents_family_handle()
|
||||
if ext_family_handle:
|
||||
ext_family = self.database.find_family_from_handle(ext_family_handle)
|
||||
ext_family = self.database.get_family_from_handle(ext_family_handle)
|
||||
father_handle = ext_family.get_father_handle()
|
||||
if father_handle:
|
||||
father = self.database.get_person_from_handle(father_handle).get_primary_name().get_regular_name()
|
||||
@ -495,7 +495,7 @@ class DetDescendantReport(Report.Report):
|
||||
if len(famList):
|
||||
fam_num= 0
|
||||
for fam_id in famList:
|
||||
fam = self.database.find_family_from_handle(fam_id)
|
||||
fam = self.database.get_family_from_handle(fam_id)
|
||||
fam_num= fam_num + 1
|
||||
spouse = ""
|
||||
if person.get_gender() == RelLib.Person.male:
|
||||
@ -576,7 +576,7 @@ class DetDescendantReport(Report.Report):
|
||||
"""Output birth, death, parentage, marriage and notes information """
|
||||
|
||||
for fam_id in person.get_family_handle_list():
|
||||
fam = self.database.find_family_from_handle(fam_id)
|
||||
fam = self.database.get_family_from_handle(fam_id)
|
||||
mate = ""
|
||||
if person.get_gender() == RelLib.Person.male:
|
||||
heshe = _("She")
|
||||
@ -647,7 +647,7 @@ class DetDescendantReport(Report.Report):
|
||||
spouseName= ""
|
||||
if len(famList):
|
||||
for fam_id in famList:
|
||||
fam = self.database.find_family_from_handle(fam_id)
|
||||
fam = self.database.get_family_from_handle(fam_id)
|
||||
if self.start.get_gender() == RelLib.Person.male:
|
||||
mother_handle = fam.get_mother_handle()
|
||||
if mother_handle:
|
||||
@ -691,7 +691,7 @@ class DetDescendantReport(Report.Report):
|
||||
if rptOpt.listChildren == reportOptions.Yes and \
|
||||
len(person.get_family_handle_list()) > 0:
|
||||
family_handle = person.get_family_handle_list()[0]
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.write_children(family, rptOpt)
|
||||
|
||||
#if rptOpt.addImages == reportOptions.Yes:
|
||||
|
@ -54,7 +54,7 @@ class FamilyGroup:
|
||||
self.db = database
|
||||
|
||||
if family_handle:
|
||||
self.family = self.db.find_family_from_handle(family_handle)
|
||||
self.family = self.db.get_family_from_handle(family_handle)
|
||||
else:
|
||||
self.family = None
|
||||
self.output = output
|
||||
@ -212,7 +212,7 @@ class FamilyGroup:
|
||||
father_name = ""
|
||||
mother_name = ""
|
||||
if family_handle:
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
if father_handle:
|
||||
father_name = self.db.get_person_from_handle(father_handle).get_primary_name().get_regular_name()
|
||||
@ -317,7 +317,7 @@ class FamilyGroup:
|
||||
|
||||
index = 1
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
for event_handle in family.get_event_list():
|
||||
if event_handle:
|
||||
event = self.db.find_event_from_handle(event_handle)
|
||||
@ -698,7 +698,7 @@ def _build_spouse_map(database,person):
|
||||
spouse_map = {}
|
||||
family_list = person.get_family_handle_list()
|
||||
for family_handle in family_list:
|
||||
family = database.find_family_from_handle(family_handle)
|
||||
family = database.get_family_from_handle(family_handle)
|
||||
if person.get_handle() == family.get_father_handle():
|
||||
spouse_id = family.get_mother_handle()
|
||||
else:
|
||||
|
@ -167,7 +167,7 @@ class FanChart:
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.filter(family.get_father_handle(),index*2)
|
||||
self.filter(family.get_mother_handle(),(index*2)+1)
|
||||
|
||||
|
@ -72,7 +72,7 @@ class FtmAncestorReport(Report.Report):
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
self.apply_filter(family.get_father_handle(),index*2,generation+1)
|
||||
self.apply_filter(family.get_mother_handle(),(index*2)+1,generation+1)
|
||||
|
||||
@ -577,7 +577,7 @@ class FtmAncestorReport(Report.Report):
|
||||
if not family_list:
|
||||
return
|
||||
family_handle = family_list[0]
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
if family.get_father_handle() == person.get_handle():
|
||||
spouse_id = family.get_mother_handle()
|
||||
else:
|
||||
@ -958,7 +958,7 @@ class FtmAncestorReport(Report.Report):
|
||||
def print_parents(self,person,dead):
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
mother_handle = family.get_mother_handle()
|
||||
father_handle = family.get_father_handle()
|
||||
if mother_handle:
|
||||
|
@ -99,7 +99,7 @@ class FtmDescendantReport(Report.Report):
|
||||
|
||||
person = self.database.get_person_from_handle(person_handle)
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
for child_handle in family.get_child_handle_list():
|
||||
ix = max(self.anc_map.keys())
|
||||
self.apply_filter(child_handle,ix+1,generation+1)
|
||||
@ -608,7 +608,7 @@ class FtmDescendantReport(Report.Report):
|
||||
first = 1
|
||||
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
if father_handle and mother_handle:
|
||||
@ -663,7 +663,7 @@ class FtmDescendantReport(Report.Report):
|
||||
name = person.get_primary_name().get_regular_name()
|
||||
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
first = 1
|
||||
|
||||
father_handle = family.get_father_handle()
|
||||
@ -1000,7 +1000,7 @@ class FtmDescendantReport(Report.Report):
|
||||
if not family_list:
|
||||
return
|
||||
family_handle = family_list[0]
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
if family.get_father_handle() == person.get_handle():
|
||||
spouse_id = family.get_mother_handle()
|
||||
else:
|
||||
@ -1381,7 +1381,7 @@ class FtmDescendantReport(Report.Report):
|
||||
def print_parents(self,person,dead):
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
mother_handle = family.get_mother_handle()
|
||||
if mother_handle:
|
||||
mother = self.database.get_person_from_handle(mother_handle)
|
||||
|
@ -398,7 +398,7 @@ def dump_person(database,person_list,file,adoptionsdashed,arrowheadstyle,
|
||||
pid = string.replace(person_handle,'-','_')
|
||||
person = database.get_person_from_handle(person_handle)
|
||||
for family_handle, mrel, frel in person.get_parent_family_handle_list():
|
||||
family = database.find_family_from_handle(family_handle)
|
||||
family = database.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
fadopted = frel != _("Birth")
|
||||
@ -500,7 +500,7 @@ def dump_index(database,person_list,file,includedates,includeurl,colorize,
|
||||
families_done.append(fam_id)
|
||||
file.write('f%s [shape=ellipse, ' % fid)
|
||||
marriage = ""
|
||||
fam = database.find_family_from_handle(fam_id)
|
||||
fam = database.get_family_from_handle(fam_id)
|
||||
|
||||
for event_handle in fam.get_event_list():
|
||||
if event_handle:
|
||||
|
@ -205,7 +205,7 @@ class IndivComplete(Report.Report):
|
||||
if family_handle == self.person.get_main_parents_family_handle():
|
||||
continue
|
||||
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
if father_handle:
|
||||
father = self.database.get_person_from_handle(father_handle)
|
||||
@ -272,7 +272,7 @@ class IndivComplete(Report.Report):
|
||||
self.d.end_row()
|
||||
|
||||
for family_handle in self.person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
if self.person.get_handle() == family.get_father_handle():
|
||||
spouse_id = family.get_mother_handle()
|
||||
else:
|
||||
@ -432,7 +432,7 @@ class IndivComplete(Report.Report):
|
||||
|
||||
family_handle = self.person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
father_inst_id = family.get_father_handle()
|
||||
if father_inst_id:
|
||||
father_inst = self.database.get_person_from_handle(father_inst_id)
|
||||
|
@ -168,7 +168,7 @@ class IndivSummary(Report.Report):
|
||||
self.d.end_row()
|
||||
|
||||
for family_handle in self.person.get_family_handle_list():
|
||||
family = self.database.find_family_from_handle(family_handle)
|
||||
family = self.database.get_family_from_handle(family_handle)
|
||||
if self.person.get_handle() == family.get_father_handle():
|
||||
spouse_id = family.get_mother_handle()
|
||||
else:
|
||||
@ -274,7 +274,7 @@ class IndivSummary(Report.Report):
|
||||
|
||||
fam_id = self.person.get_main_parents_family_handle()
|
||||
if fam_id:
|
||||
family = self.database.find_family_from_handle(fam_id)
|
||||
family = self.database.get_family_from_handle(fam_id)
|
||||
father_handle = family.get_father_handle()
|
||||
if father_handle:
|
||||
dad = self.database.get_person_from_handle(father_handle)
|
||||
|
@ -150,7 +150,7 @@ class Merge:
|
||||
p1 = self.db.get_person_from_handle(p1_id)
|
||||
f1_id = p1.get_main_parents_family_handle()
|
||||
if f1_id:
|
||||
f1 = self.db.find_family_from_handle(f1_id)
|
||||
f1 = self.db.get_family_from_handle(f1_id)
|
||||
self.ancestors_of(f1.get_father_handle(),id_list)
|
||||
self.ancestors_of(f1.get_mother_handle(),id_list)
|
||||
|
||||
@ -541,8 +541,8 @@ class Merge:
|
||||
f2_id = p2.get_main_parents_family_handle()
|
||||
|
||||
if f1_id and f2_id:
|
||||
f1 = self.db.find_family_from_handle(f1_id)
|
||||
f2 = self.db.find_family_from_handle(f2_id)
|
||||
f1 = self.db.get_family_from_handle(f1_id)
|
||||
f2 = self.db.get_family_from_handle(f2_id)
|
||||
dad1_id = f1.get_father_handle()
|
||||
if dad1_id:
|
||||
dad1 = get_name_obj(self.db.get_person_from_handle(dad1_id))
|
||||
@ -579,9 +579,9 @@ class Merge:
|
||||
chance = chance + value
|
||||
|
||||
for f1_id in p1.get_family_handle_list():
|
||||
f1 = self.db.find_family_from_handle(f1_id)
|
||||
f1 = self.db.get_family_from_handle(f1_id)
|
||||
for f2_id in p2.get_family_handle_list():
|
||||
f2 = self.db.find_family_from_handle(f2_id)
|
||||
f2 = self.db.get_family_from_handle(f2_id)
|
||||
if p1.get_gender() == RelLib.Person.female:
|
||||
father1_id = f1.get_father_handle()
|
||||
father2_id = f2.get_father_handle()
|
||||
|
@ -521,7 +521,7 @@ def _write_graph_box (self):
|
||||
individual = self.db.get_person_from_handle(individual_id)
|
||||
for family_handle, mother_rel_ship, father_rel_ship\
|
||||
in individual.get_parent_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
if self.ShowFamilies and family_handle in family_nodes:
|
||||
@ -542,7 +542,7 @@ def _write_graph_box (self):
|
||||
_write_edge(self.File, style="solid",
|
||||
arrowHead=self.ArrowHeadStyle,arrowTail=self.ArrowTailStyle)
|
||||
for family_handle in family_nodes:
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
if father_handle and father_handle in individual_nodes:
|
||||
_write_edge(self.File, family_handle, father_handle)
|
||||
@ -603,7 +603,7 @@ def _write_graph_record (self):
|
||||
husbands = [] # filtered-in husbands (naturalRelatives)
|
||||
unknown_husbands = 0 # filtered-out/unknown husbands
|
||||
for family_handle in individual.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
husband_id = family.get_father_handle()
|
||||
if husband_id and husband_id in self.individual_set:
|
||||
if husband_id not in natural_relatives:
|
||||
@ -615,7 +615,7 @@ def _write_graph_record (self):
|
||||
else:
|
||||
family_nodes[individual_id] = [individual_id]
|
||||
for family_handle in individual.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
wife_id = family.get_mother_handle()
|
||||
if wife_id in self.individual_set:
|
||||
family_nodes[individual_id].append(wife_id)
|
||||
@ -636,7 +636,7 @@ def _write_graph_record (self):
|
||||
individual_from = self.db.get_person_from_handle(individual_from_handle)
|
||||
for family_handle, mother_rel_ship, father_rel_ship\
|
||||
in individual_from.get_parent_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
# Things are complicated here because a parent may or
|
||||
@ -788,7 +788,7 @@ def _get_edge_style (self, father_rel_ship, mother_rel_ship="Birth"):
|
||||
def _get_family_handle_label (self, family_handle):
|
||||
"""Returns a formatted string of family data suitable for a label"""
|
||||
|
||||
fam = self.db.find_family_from_handle(family_handle)
|
||||
fam = self.db.get_family_from_handle(family_handle)
|
||||
for event_handle in fam.get_event_list():
|
||||
if event_handle:
|
||||
event = self.db.find_event_from_handle(event_handle)
|
||||
@ -822,7 +822,7 @@ def _get_family_handle_record_label (self, record):
|
||||
marriage_event_handle = None
|
||||
for individual_family_handle in individual.get_family_handle_list():
|
||||
if individual_family_handle in spouse.get_family_handle_list():
|
||||
individual_family = self.db.find_family_from_handle(individual_family_handle)
|
||||
individual_family = self.db.get_family_from_handle(individual_family_handle)
|
||||
for event_handle in individual_family.get_event_list():
|
||||
if event_handle:
|
||||
event = self.db.find_event_from_handle(event_handle)
|
||||
|
@ -273,7 +273,7 @@ class Verify:
|
||||
prev_sdyear=0
|
||||
fnum = 0
|
||||
for family_handle in person.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
fnum = fnum + 1
|
||||
mother_handle = family.get_mother_handle()
|
||||
father_handle = family.get_father_handle()
|
||||
|
@ -353,7 +353,7 @@ class IndividualPage:
|
||||
|
||||
family_handle = self.person.get_main_parents_family_handle()
|
||||
if family_handle:
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
self.write_link_row("%s:" % _("Father"), family.get_father_handle())
|
||||
self.write_link_row("%s:" % _("Mother"), family.get_mother_handle())
|
||||
else:
|
||||
@ -629,7 +629,7 @@ class IndividualPage:
|
||||
self.doc.start_table("three","IndTable")
|
||||
|
||||
for family_handle in self.person.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
if self.person.get_handle() == family.get_father_handle():
|
||||
spouse_id = family.get_mother_handle()
|
||||
else:
|
||||
@ -1579,7 +1579,7 @@ class MiniTree:
|
||||
family_handle = person.get_main_parents_family_handle()
|
||||
if not family_handle: return
|
||||
|
||||
family = self.db.find_family_from_handle(family_handle)
|
||||
family = self.db.get_family_from_handle(family_handle)
|
||||
father_handle = family.get_father_handle()
|
||||
mother_handle = family.get_mother_handle()
|
||||
|
||||
|
@ -201,7 +201,7 @@ class PackageWriter:
|
||||
def remove_clicked():
|
||||
# File is lost => remove all references and the object itself
|
||||
for p_id in self.db.get_family_handles():
|
||||
p = self.db.find_family_from_handle(p_id)
|
||||
p = self.db.get_family_from_handle(p_id)
|
||||
nl = p.get_media_list()
|
||||
for o in nl:
|
||||
if o.get_reference_handle() == self.object_handle:
|
||||
|
@ -85,7 +85,7 @@ class PackageWriter:
|
||||
def remove_clicked():
|
||||
# File is lost => remove all references and the object itself
|
||||
for p_id in self.db.get_family_handles():
|
||||
p = self.db.find_family_from_handle(p_id)
|
||||
p = self.db.get_family_from_handle(p_id)
|
||||
nl = p.get_media_list()
|
||||
for o in nl:
|
||||
if o.get_reference_handle() == m_id:
|
||||
|
@ -328,7 +328,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
def is_spouse(self,orig,other):
|
||||
for f in orig.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(f)
|
||||
family = self.db.get_family_from_handle(f)
|
||||
if family:
|
||||
if other == family.get_father_handle() or other == family.get_mother_handle():
|
||||
return 1
|
||||
|
@ -177,7 +177,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
def is_fathermother_in_law(self,orig,other):
|
||||
for f in other.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(f)
|
||||
family = self.db.get_family_from_handle(f)
|
||||
sp_id = None
|
||||
if family:
|
||||
if other == family.get_father_handle():
|
||||
@ -185,7 +185,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
elif other == family.get_mother_handle():
|
||||
sp_id = family.get_father_handle()
|
||||
for g in orig.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(g)
|
||||
family = self.db.get_family_from_handle(g)
|
||||
if family:
|
||||
if sp_id in family.get_child_handle_list():
|
||||
return 1
|
||||
@ -193,7 +193,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
def get_fathermother_in_law_common(self,orig,other):
|
||||
for f in other.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(f)
|
||||
family = self.db.get_family_from_handle(f)
|
||||
sp_id = None
|
||||
if family:
|
||||
if other == family.get_father_handle():
|
||||
@ -201,7 +201,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
elif other == family.get_mother_handle():
|
||||
sp_id = family.get_father_handler()
|
||||
for g in orig.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(g)
|
||||
family = self.db.get_family_from_handle(g)
|
||||
if family:
|
||||
if sp_id in family.get_child_handle_list():
|
||||
return [sp]
|
||||
@ -216,7 +216,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
def is_brothersister_in_law(self,orig,other):
|
||||
for f in orig.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(f)
|
||||
family = self.db.get_family_from_handle(f)
|
||||
sp_id = None
|
||||
if family:
|
||||
if orig == family.get_father_handle():
|
||||
@ -225,7 +225,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
sp_id = family.get_father_handler()
|
||||
|
||||
p = other.get_main_parents_family_handle()
|
||||
family = self.db.find_family_from_handle(p)
|
||||
family = self.db.get_family_from_handle(p)
|
||||
if family:
|
||||
c = family.get_child_handle_list()
|
||||
if (other.get_handle() in c) and (sp_id in c):
|
||||
@ -234,7 +234,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
def get_brothersister_in_law_common(self,orig,other):
|
||||
for f in orig.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(f)
|
||||
family = self.db.get_family_from_handle(f)
|
||||
sp_id = None
|
||||
if family:
|
||||
if orig == family.get_father_handle():
|
||||
@ -243,7 +243,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
sp_id = family.get_father_handler()
|
||||
|
||||
p = other.get_main_parents_family_handle()
|
||||
family = self.db.find_family_from_handle(p)
|
||||
family = self.db.get_family_from_handle(p)
|
||||
if family:
|
||||
c = family.get_child_handle_list()
|
||||
if (other.get_handle() in c) and (sp_id in c):
|
||||
|
@ -197,7 +197,7 @@ class RelationshipCalculator(Relationship.RelationshipCalculator):
|
||||
|
||||
def is_spouse(self,orig,other):
|
||||
for f in orig.get_family_handle_list():
|
||||
family = self.db.find_family_from_handle(f)
|
||||
family = self.db.get_family_from_handle(f)
|
||||
if family:
|
||||
if other == family.get_father_handle() or other == family.get_mother_handle():
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user