4647: Fix ListModel so that it uses the correct sort column

svn: r16620
This commit is contained in:
Nick Hall 2011-02-15 11:12:57 +00:00
parent 370545fda9
commit 84a1c79fc2
2 changed files with 5 additions and 7 deletions

View File

@ -211,8 +211,7 @@ class ListModel(object):
column.set_clickable(False)
else:
column.set_clickable(True)
#column.set_sort_column_id(name[1])
column.set_sort_column_id(cnum)
column.set_sort_column_id(name[1])
column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED)
column.set_fixed_width(name[2])

View File

@ -441,16 +441,15 @@ class ViewManager(CLIManager):
self.list = ListModel(glade.get_object("list"), [
# name, click?, width, toggle
{"name": _('Select'),
"sort_id": NOSORT,
"width": 60,
"type": TOGGLE,
"visible_col": 6,
"editable": True}, # 0 selected?
(_('Type'), 1, 180), # 1 new gramplet
(_('Name'), 1, 200), # 2 name (version)
(_('Description'), 1, 200), # 3 description
('', 1, 0), # 4 url
('', 1, 0), # 5 id
(_('Name'), 2, 200), # 2 name (version)
(_('Description'), 3, 200), # 3 description
('', NOSORT, 0), # 4 url
('', NOSORT, 0), # 5 id
{"name": '', "type": TOGGLE}, # 6 visible? bool
], list_mode="tree")
pos = None