add missing iterator methods to filter.py, use get_family_handles instead of the iterator in ExportGedcom.py
svn: r12790
This commit is contained in:
parent
aa5fce63a7
commit
d45f5970fb
@ -53,19 +53,19 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
self.plist = set(person_filter.apply(
|
self.plist = set(person_filter.apply(
|
||||||
self.db, self.db.iter_person_handles()))
|
self.db, self.db.iter_person_handles()))
|
||||||
else:
|
else:
|
||||||
self.plist = self.db.iter_person_handles()
|
self.plist = self.db.get_person_handles()
|
||||||
|
|
||||||
if event_filter:
|
if event_filter:
|
||||||
self.elist = set(event_filter.apply(
|
self.elist = set(event_filter.apply(
|
||||||
self.db, self.db.iter_event_handles()))
|
self.db, self.db.iter_event_handles()))
|
||||||
else:
|
else:
|
||||||
self.elist = self.db.iter_event_handles()
|
self.elist = self.db.get_event_handles()
|
||||||
|
|
||||||
if note_filter:
|
if note_filter:
|
||||||
self.nlist = set(note_filter.apply(
|
self.nlist = set(note_filter.apply(
|
||||||
self.db, self.db.iter_note_handles()))
|
self.db, self.db.iter_note_handles()))
|
||||||
else:
|
else:
|
||||||
self.nlist = self.db.iter_note_handles()
|
self.nlist = self.db.get_note_handles()
|
||||||
|
|
||||||
self.flist = set()
|
self.flist = set()
|
||||||
for handle in list(self.plist):
|
for handle in list(self.plist):
|
||||||
@ -295,6 +295,13 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
the database.
|
the database.
|
||||||
"""
|
"""
|
||||||
return list(self.elist)
|
return list(self.elist)
|
||||||
|
|
||||||
|
def iter_event_handles(self):
|
||||||
|
"""
|
||||||
|
Return an iterator over database handles, one handle for each Person in
|
||||||
|
the database.
|
||||||
|
"""
|
||||||
|
return self.elist
|
||||||
|
|
||||||
def get_family_handles(self):
|
def get_family_handles(self):
|
||||||
"""
|
"""
|
||||||
@ -302,6 +309,13 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
the database.
|
the database.
|
||||||
"""
|
"""
|
||||||
return list(self.flist)
|
return list(self.flist)
|
||||||
|
|
||||||
|
def iter_family_handles(self):
|
||||||
|
"""
|
||||||
|
Return an iterator over database handles, one handle for each Person in
|
||||||
|
the database.
|
||||||
|
"""
|
||||||
|
return self.flist
|
||||||
|
|
||||||
def get_note_handles(self):
|
def get_note_handles(self):
|
||||||
"""
|
"""
|
||||||
@ -310,6 +324,13 @@ class FilterProxyDb(ProxyDbBase):
|
|||||||
"""
|
"""
|
||||||
return list(self.nlist)
|
return list(self.nlist)
|
||||||
|
|
||||||
|
def iter_note_handles(self):
|
||||||
|
"""
|
||||||
|
Return an iterator over database handles, one handle for each Person in
|
||||||
|
the database.
|
||||||
|
"""
|
||||||
|
return self.nlist
|
||||||
|
|
||||||
def get_default_person(self):
|
def get_default_person(self):
|
||||||
"""returns the default Person of the database"""
|
"""returns the default Person of the database"""
|
||||||
person = self.db.get_default_person()
|
person = self.db.get_default_person()
|
||||||
|
@ -918,7 +918,7 @@ class GedcomWriter(BasicUtils.UpdateCallback):
|
|||||||
# generate a list of (GRAMPS_ID, HANDLE) pairs. This list
|
# generate a list of (GRAMPS_ID, HANDLE) pairs. This list
|
||||||
# can then be sorted by the sort routine, which will use the
|
# can then be sorted by the sort routine, which will use the
|
||||||
# first value of the tuple as the sort key.
|
# first value of the tuple as the sort key.
|
||||||
sorted_list = sort_handles_by_id(self.dbase.iter_family_handles(),
|
sorted_list = sort_handles_by_id(self.dbase.get_family_handles(),
|
||||||
self.dbase.get_family_from_handle)
|
self.dbase.get_family_from_handle)
|
||||||
|
|
||||||
# loop through the sorted list, pulling of the handle. This list
|
# loop through the sorted list, pulling of the handle. This list
|
||||||
|
Loading…
Reference in New Issue
Block a user