completion

svn: r5976
This commit is contained in:
Don Allingham
2006-02-23 05:08:25 +00:00
parent 72d064f5b5
commit 17873c0d3a
3 changed files with 17 additions and 27 deletions

View File

@@ -2045,3 +2045,18 @@ class DbState(GrampsDBCallback):
self.active = None
self.open = False
self.emit('no-database')
def get_place_completion(self):
import locale
store = gtk.ListStore(str,str)
foo = []
for val in self.places.keys():
foo.append((locale.strxform(self.places[val]),val))
foo.sort()
for val in foo:
self.store.append(row=[val[1],val[0]])
self.completion = gtk.EntryCompletion()
self.completion.set_text_column(0)
self.completion.set_model(store)
return self.completion