make columns in ChoosePGPKey dialogs sortable. fixes #3520

This commit is contained in:
Yann Leboulanger 2007-11-13 19:58:22 +00:00
parent ef5cef3510
commit 0a7669afef
1 changed files with 5 additions and 3 deletions

View File

@ -327,11 +327,13 @@ class ChooseGPGKeyDialog:
self.keys_treeview.set_model(model)
#columns
renderer = gtk.CellRendererText()
self.keys_treeview.insert_column_with_attributes(-1, _('KeyID'),
col = self.keys_treeview.insert_column_with_attributes(-1, _('KeyID'),
renderer, text = 0)
col.set_sort_column_id(0)
renderer = gtk.CellRendererText()
self.keys_treeview.insert_column_with_attributes(-1, _('Contact name'),
renderer, text = 1)
col = self.keys_treeview.insert_column_with_attributes(-1,
_('Contact name'), renderer, text = 1)
col.set_sort_column_id(1)
self.keys_treeview.set_search_column(1)
self.fill_tree(secret_keys, selected)
self.window.show_all()