diff --git a/ChangeLog b/ChangeLog index d79907112..e44728604 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,48 @@ +2004-08-19 Don Allingham + * 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 * src/RelLib.py (probably_alive): Use get_family_from_handle instead of find_family_from_handle. diff --git a/src/AddSpouse.py b/src/AddSpouse.py index 3bcb0dffa..b3efe08fb 100644 --- a/src/AddSpouse.py +++ b/src/AddSpouse.py @@ -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) diff --git a/src/EditPerson.py b/src/EditPerson.py index 7dd94ef96..b61eef181 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -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() diff --git a/src/EditSource.py b/src/EditSource.py index 04dfb5eb5..a6921866d 100644 --- a/src/EditSource.py +++ b/src/EditSource.py @@ -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: diff --git a/src/GraphLayout.py b/src/GraphLayout.py index 329a7bbcc..24bf55725 100644 --- a/src/GraphLayout.py +++ b/src/GraphLayout.py @@ -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: diff --git a/src/ImageSelect.py b/src/ImageSelect.py index ad8547135..9c5221175 100644 --- a/src/ImageSelect.py +++ b/src/ImageSelect.py @@ -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(): diff --git a/src/MediaView.py b/src/MediaView.py index be4007804..2972001af 100644 --- a/src/MediaView.py +++ b/src/MediaView.py @@ -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 diff --git a/src/MergeData.py b/src/MergeData.py index 5a449307b..5288e7eb1 100644 --- a/src/MergeData.py +++ b/src/MergeData.py @@ -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 diff --git a/src/PeopleModel.py b/src/PeopleModel.py index 332923352..b03afe927 100644 --- a/src/PeopleModel.py +++ b/src/PeopleModel.py @@ -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): diff --git a/src/PlaceView.py b/src/PlaceView.py index 5124ff0fa..30f9fab59 100644 --- a/src/PlaceView.py +++ b/src/PlaceView.py @@ -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) diff --git a/src/ReadXML.py b/src/ReadXML.py index 3c35b0687..84cba8af2 100644 --- a/src/ReadXML.py +++ b/src/ReadXML.py @@ -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: diff --git a/src/RelLib.py b/src/RelLib.py index 5f4b7c8a2..c184f087a 100644 --- a/src/RelLib.py +++ b/src/RelLib.py @@ -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 diff --git a/src/Relationship.py b/src/Relationship.py index d398d408a..a10638d1b 100644 --- a/src/Relationship.py +++ b/src/Relationship.py @@ -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 diff --git a/src/SelectChild.py b/src/SelectChild.py index 121576b44..31de147fa 100644 --- a/src/SelectChild.py +++ b/src/SelectChild.py @@ -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(): diff --git a/src/SourceView.py b/src/SourceView.py index ee7f0f80c..58021be1b 100644 --- a/src/SourceView.py +++ b/src/SourceView.py @@ -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: diff --git a/src/SubstKeywords.py b/src/SubstKeywords.py index 25628b6b1..5742853e5 100644 --- a/src/SubstKeywords.py +++ b/src/SubstKeywords.py @@ -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: diff --git a/src/WriteXML.py b/src/WriteXML.py index e32a9a0bb..b79c9c1e1 100644 --- a/src/WriteXML.py +++ b/src/WriteXML.py @@ -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 diff --git a/src/gramps_main.py b/src/gramps_main.py index 41307036a..bbf70f908 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -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) diff --git a/src/plugins/AncestorChart.py b/src/plugins/AncestorChart.py index 5c178de91..5f818d5b1 100644 --- a/src/plugins/AncestorChart.py +++ b/src/plugins/AncestorChart.py @@ -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) diff --git a/src/plugins/AncestorChart2.py b/src/plugins/AncestorChart2.py index 04d29b230..f673797bb 100644 --- a/src/plugins/AncestorChart2.py +++ b/src/plugins/AncestorChart2.py @@ -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) diff --git a/src/plugins/AncestorReport.py b/src/plugins/AncestorReport.py index 67112ec8d..a451b4cbf 100644 --- a/src/plugins/AncestorReport.py +++ b/src/plugins/AncestorReport.py @@ -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) diff --git a/src/plugins/Ancestors.py b/src/plugins/Ancestors.py index c75f2aa2b..437b22c47 100644 --- a/src/plugins/Ancestors.py +++ b/src/plugins/Ancestors.py @@ -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]: diff --git a/src/plugins/Check.py b/src/plugins/Check.py index db4f9d150..068bd8bb4 100644 --- a/src/plugins/Check.py +++ b/src/plugins/Check.py @@ -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()) diff --git a/src/plugins/CountAncestors.py b/src/plugins/CountAncestors.py index e5a8d51f2..c1cb6d7e4 100644 --- a/src/plugins/CountAncestors.py +++ b/src/plugins/CountAncestors.py @@ -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: diff --git a/src/plugins/Desbrowser.py b/src/plugins/Desbrowser.py index e12585597..bb5231bc9 100644 --- a/src/plugins/Desbrowser.py +++ b/src/plugins/Desbrowser.py @@ -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 diff --git a/src/plugins/DescendReport.py b/src/plugins/DescendReport.py index 0789b98c7..c97782c71 100644 --- a/src/plugins/DescendReport.py +++ b/src/plugins/DescendReport.py @@ -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) diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 1e09dc3d1..1172733b5 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -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: diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index 86e76cc33..3b7ec30a7 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -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: diff --git a/src/plugins/FamilyGroup.py b/src/plugins/FamilyGroup.py index fd4ef5853..49e0c20b7 100644 --- a/src/plugins/FamilyGroup.py +++ b/src/plugins/FamilyGroup.py @@ -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: diff --git a/src/plugins/FanChart.py b/src/plugins/FanChart.py index fdf2ff06d..965e5c2fe 100644 --- a/src/plugins/FanChart.py +++ b/src/plugins/FanChart.py @@ -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) diff --git a/src/plugins/FtmStyleAncestors.py b/src/plugins/FtmStyleAncestors.py index dc201659c..4db6620ff 100644 --- a/src/plugins/FtmStyleAncestors.py +++ b/src/plugins/FtmStyleAncestors.py @@ -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: diff --git a/src/plugins/FtmStyleDescendants.py b/src/plugins/FtmStyleDescendants.py index 55efda83c..0b1c1ac95 100644 --- a/src/plugins/FtmStyleDescendants.py +++ b/src/plugins/FtmStyleDescendants.py @@ -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) diff --git a/src/plugins/GraphViz.py b/src/plugins/GraphViz.py index e51fd192d..260ba09cc 100644 --- a/src/plugins/GraphViz.py +++ b/src/plugins/GraphViz.py @@ -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: diff --git a/src/plugins/IndivComplete.py b/src/plugins/IndivComplete.py index db739741e..507433f52 100644 --- a/src/plugins/IndivComplete.py +++ b/src/plugins/IndivComplete.py @@ -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) diff --git a/src/plugins/IndivSummary.py b/src/plugins/IndivSummary.py index 86691d91a..a7dd111a8 100644 --- a/src/plugins/IndivSummary.py +++ b/src/plugins/IndivSummary.py @@ -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) diff --git a/src/plugins/Merge.py b/src/plugins/Merge.py index adcf9c184..0f67f4d44 100644 --- a/src/plugins/Merge.py +++ b/src/plugins/Merge.py @@ -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() diff --git a/src/plugins/RelGraph.py b/src/plugins/RelGraph.py index 64d6e2039..46789357f 100644 --- a/src/plugins/RelGraph.py +++ b/src/plugins/RelGraph.py @@ -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) diff --git a/src/plugins/Verify.py b/src/plugins/Verify.py index b2381b2c2..0d38d52fb 100644 --- a/src/plugins/Verify.py +++ b/src/plugins/Verify.py @@ -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() diff --git a/src/plugins/WebPage.py b/src/plugins/WebPage.py index 6b7613479..2e942102c 100644 --- a/src/plugins/WebPage.py +++ b/src/plugins/WebPage.py @@ -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() diff --git a/src/plugins/WriteCD.py b/src/plugins/WriteCD.py index 7a09001a9..c4c835080 100644 --- a/src/plugins/WriteCD.py +++ b/src/plugins/WriteCD.py @@ -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: diff --git a/src/plugins/WritePkg.py b/src/plugins/WritePkg.py index d74066ee2..d4bb7c0b9 100644 --- a/src/plugins/WritePkg.py +++ b/src/plugins/WritePkg.py @@ -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: diff --git a/src/plugins/rel_de.py b/src/plugins/rel_de.py index c3263652a..f3b8c6d52 100644 --- a/src/plugins/rel_de.py +++ b/src/plugins/rel_de.py @@ -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 diff --git a/src/plugins/rel_hu.py b/src/plugins/rel_hu.py index 850d79dfb..dd843c74c 100644 --- a/src/plugins/rel_hu.py +++ b/src/plugins/rel_hu.py @@ -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): diff --git a/src/plugins/rel_ru.py b/src/plugins/rel_ru.py index 42e3ea27e..91f26a8ac 100644 --- a/src/plugins/rel_ru.py +++ b/src/plugins/rel_ru.py @@ -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