* src/DisplayModels.py: use a dictionary to handle reverse

indices instead of list.index function. Drastically reduces
time are larger lists.
* src/GrampsDbBase.py: use cursors to build sorted key lists
* src/PeopleModel.py: fetch sort names out of database first
instead of continuously fetching from database during sort
* src/PeopleView.py: remove unnecessary apply_filter
* src/PlaceView.py: remove commented-out code
* src/ReadXML.py: add gtk event handling to allow screen to
update
* src/gramps.glade: use gramps.png for loading message window
* src/gramps_main.py: remove delete_abandoned_photos calls

* src/PeopleModel.py: Fixed rebuild_display
* src/ReadXML.py: Fixed calendar handling


svn: r3819
This commit is contained in:
Don Allingham
2004-12-19 22:55:41 +00:00
parent 6dea6f401e
commit 295e9a530f
11 changed files with 168 additions and 120 deletions

View File

@ -676,10 +676,18 @@ class GrampsDbBase:
the database. If sort_handles is True, the list is sorted by surnames
"""
if self.person_map:
handle_list = self.person_map.keys()
if sort_handles:
handle_list.sort(self._sortbyname)
return handle_list
slist = []
cursor = self.get_person_cursor()
data = cursor.first()
while data:
slist.append((data[1][3].sname,data[0]))
data = cursor.next()
cursor.close()
slist.sort()
return map(lambda x: x[1], slist)
else:
return self.person_map.keys()
return []
def get_place_handles(self,sort_handles=True):
@ -689,10 +697,19 @@ class GrampsDbBase:
Place title.
"""
if self.place_map:
handle_list = self.place_map.keys()
if sort_handles:
handle_list.sort(self._sortbyplace)
return handle_list
slist = []
cursor = self.get_place_cursor()
data = cursor.first()
while data:
slist.append((data[1][2],data[0]))
data = cursor.next()
cursor.close()
slist.sort()
val = map(lambda x: x[1], slist)
return val
else:
return self.place_map.keys()
return []
def get_source_handles(self,sort_handles=True):