Replace get_place_handles with iter_place_handles

svn: r12778
This commit is contained in:
Gerald Britton
2009-07-08 18:11:02 +00:00
parent b601f4bdf2
commit 181c0c9b41
11 changed files with 46 additions and 12 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ class DataEntryGramplet(Gramplet):
def get_or_create_place(self, place_name):
if place_name == "": return (-1, None)
place_list = self.dbstate.db.get_place_handles()
place_list = self.dbstate.iter.get_place_handles()
for place_handle in place_list:
place = self.dbstate.db.get_place_from_handle(place_handle)
if place.get_title().strip() == place_name:
+2 -2
View File
@@ -808,8 +808,8 @@ class CSVParser(object):
return person
def get_or_create_place(self,place_name):
place_list = self.db.get_place_handles()
if self.debug: print "get_or_create_place: list:", place_list
place_list = self.db.iter_place_handles()
if self.debug: print "get_or_create_place: list:", list(place_list)
if self.debug: print "get_or_create_place: looking for:", place_name
for place_handle in place_list:
place = self.db.get_place_from_handle(place_handle)
+1 -1
View File
@@ -75,7 +75,7 @@ class PlaceReport(Report):
if self.filter.get_name() != '':
# Use the selected filter to provide a list of place handles
plist = self.database.get_place_handles(sort_handles=False)
plist = self.database.iter_place_handles()
self.place_handles = self.filter.apply(self.database, plist)
else:
# Use the place handles selected without a filter
+2 -2
View File
@@ -430,11 +430,11 @@ class ExtractCity(Tool.BatchTool, ManagedWindow.ManagedWindow):
self.progress = ProgressMeter(_('Checking Place Titles'), '')
self.progress.set_pass(_('Looking for place fields'),
len(self.db.get_place_handles()))
self.db.get_number_of_places())
self.name_list = []
for handle in db.get_place_handles():
for handle in db.iter_place_handles():
place = db.get_place_from_handle(handle)
descr = place.get_title()
loc = place.get_main_location()