Allow column sorting
svn: r6944
This commit is contained in:
parent
a5a4eed7fc
commit
0b6f8f5e45
@ -7,6 +7,8 @@
|
||||
Properly add icon list.
|
||||
* src/Selectors/_BaseSelector.py (BaseSelector.add_columns): Allow
|
||||
resize-able columns.
|
||||
* src/plugins/DumpGenderStats.py: Allow column sorting.
|
||||
* src/ListModel.py: Allow column sorting.
|
||||
|
||||
2006-06-21 Don Allingham <don@gramps-project.org>
|
||||
* src/DataViews/_PersonView.py: import QuestionDialog
|
||||
|
@ -28,6 +28,7 @@ TEXT = 0
|
||||
TOGGLE = 1
|
||||
COMBO = 2
|
||||
IMAGE = 3
|
||||
INTEGER = 4
|
||||
|
||||
NOSORT = -1
|
||||
#-------------------------------------------------------------------------
|
||||
@ -49,6 +50,8 @@ class ListModel:
|
||||
self.mylist.append(bool)
|
||||
elif l[3] == IMAGE:
|
||||
self.mylist.append(gtk.gdk.Pixbuf)
|
||||
elif l[3] == INTEGER:
|
||||
self.mylist.append(int)
|
||||
else:
|
||||
self.mylist.append(str)
|
||||
self.data_index += 1
|
||||
|
@ -52,9 +52,11 @@ class DumpGenderStats(Tool.Tool, ManagedWindow.ManagedWindow):
|
||||
|
||||
if uistate:
|
||||
titles = [
|
||||
(_('Name'),1,100), (_('Male'),2,70),
|
||||
(_('Female'),3,70), (_('Unknown'),4,70),
|
||||
(_('Guess'),5,70)
|
||||
(_('Name'),0,100),
|
||||
(_('Male'),1,70,ListModel.INTEGER),
|
||||
(_('Female'),2,70,ListModel.INTEGER),
|
||||
(_('Unknown'),3,70,ListModel.INTEGER),
|
||||
(_('Guess'),4,70)
|
||||
]
|
||||
|
||||
treeview = gtk.TreeView()
|
||||
|
Loading…
Reference in New Issue
Block a user