diff --git a/ChangeLog b/ChangeLog index 6abe2e8e1..28dda8afc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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 * src/DataViews/_PersonView.py: import QuestionDialog diff --git a/src/ListModel.py b/src/ListModel.py index ded6872b8..9b77c3553 100644 --- a/src/ListModel.py +++ b/src/ListModel.py @@ -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 diff --git a/src/plugins/DumpGenderStats.py b/src/plugins/DumpGenderStats.py index d4682fe30..2afd92f64 100644 --- a/src/plugins/DumpGenderStats.py +++ b/src/plugins/DumpGenderStats.py @@ -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()