Faster load times for places

svn: r1364
This commit is contained in:
Don Allingham
2003-03-20 02:54:28 +00:00
parent c571927351
commit 64de2e6acf
4 changed files with 37 additions and 10 deletions

View File

@@ -110,7 +110,13 @@ class PlaceView:
on large databases, and should only be called when absolutely
necessary"""
self.model.clear()
self.model = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING, gobject.TYPE_STRING,
gobject.TYPE_STRING)
self.id2col = {}
for key in self.db.getPlaceKeys():
@@ -124,7 +130,8 @@ class PlaceView:
8, val[8], 9, val[9], 10, val[10], 11, val[11],
12, val[12]
)
self.list.connect('button-press-event',self.button_press)
self.list.set_model(self.model)
self.list.get_column(0).clicked()
def merge(self):