summaryrefslogtreecommitdiffstats
path: root/divelist.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-20 14:10:28 -0700
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-09-20 14:10:28 -0700
commitf627dde02305f0bee1183ed8a968dc7ad041dab5 (patch)
treee68854f60e3d117fcbed208fc0dcb31a50de64dc /divelist.c
parent0bf2cfa66d489a43090fcca0e220260a74cc9f20 (diff)
downloadsubsurface-f627dde02305f0bee1183ed8a968dc7ad041dab5.tar.gz
Fix divelist sorting
That was stupid. The divelist column generation cleanup (commit d3feb78df527: "Make helper function for creating TreeView columns in the dive list") had a but too much copy-paste going on, and didn't always have the right column indexes.. t still *looked* right, but sorting didn't work at all. Reported-by: Chris Lewis <chrislewis915@gmail.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'divelist.c')
-rw-r--r--divelist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/divelist.c b/divelist.c
index e00092436..641e3c8b3 100644
--- a/divelist.c
+++ b/divelist.c
@@ -428,7 +428,7 @@ static GtkTreeViewColumn *divelist_column(struct DiveList *dl, int index, const
col = gtk_tree_view_column_new();
gtk_tree_view_column_set_title(col, title);
- gtk_tree_view_column_set_sort_column_id(col, DIVE_DATE);
+ gtk_tree_view_column_set_sort_column_id(col, index);
gtk_tree_view_column_set_resizable(col, TRUE);
gtk_tree_view_column_pack_start(col, renderer, TRUE);
if (data_func)
@@ -476,7 +476,7 @@ GtkWidget *dive_list_create(void)
dive_list.temperature = divelist_column(&dive_list, DIVE_TEMPERATURE, "degF", temperature_data_func, 1, 0);
dive_list.cylinder = divelist_column(&dive_list, DIVE_CYLINDER, "Cyl", NULL, 0, 0);
dive_list.nitrox = divelist_column(&dive_list, DIVE_NITROX, "O2%", nitrox_data_func, 1, 0);
- dive_list.sac = divelist_column(&dive_list, DIVE_NITROX, "SAC", sac_data_func, 1, 0);
+ dive_list.sac = divelist_column(&dive_list, DIVE_SAC, "SAC", sac_data_func, 1, 0);
fill_dive_list();