summaryrefslogtreecommitdiffstats
path: root/equipment.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-12-11 11:40:17 -0800
committerGravatar Linus Torvalds <torvalds@linux-foundation.org>2011-12-11 11:40:17 -0800
commitf078bc04e1f55ad9ecd0632fcfa5753440ba2267 (patch)
treea54d6bd997af8ea63db58915ba41908051b5a720 /equipment.c
parent50d026230fa7303b33821da1346875b30f5ab00d (diff)
downloadsubsurface-f078bc04e1f55ad9ecd0632fcfa5753440ba2267.tar.gz
Make the cylinder table columns unsortable
They were never intended to be sortable, but using common code with the dive list picked up that "sort by index" thing by mistake. If we really want to be able to sort cylinders by O2 percentage (which really doesn't seem to make much sense, considering that you usually have just one or two cylinders) we will need to also handle the case of editing the (differently sorted) cylinder table. Which we don't do now. Reported-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'equipment.c')
-rw-r--r--equipment.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/equipment.c b/equipment.c
index 6f09602d8..9c2b4054f 100644
--- a/equipment.c
+++ b/equipment.c
@@ -897,13 +897,13 @@ GtkWidget *cylinder_list_widget(void)
"enable-grid-lines", GTK_TREE_VIEW_GRID_LINES_BOTH,
NULL);
- tree_view_column(tree_view, CYL_DESC, "Type", NULL, PANGO_ALIGN_LEFT, TRUE);
- tree_view_column(tree_view, CYL_SIZE, "Size", size_data_func, PANGO_ALIGN_RIGHT, TRUE);
- tree_view_column(tree_view, CYL_WORKP, "MaxPress", pressure_data_func, PANGO_ALIGN_RIGHT, TRUE);
- tree_view_column(tree_view, CYL_STARTP, "Start", pressure_data_func, PANGO_ALIGN_RIGHT, TRUE);
- tree_view_column(tree_view, CYL_ENDP, "End", pressure_data_func, PANGO_ALIGN_RIGHT, TRUE);
- tree_view_column(tree_view, CYL_O2, "O" UTF8_SUBSCRIPT_2 "%", percentage_data_func, PANGO_ALIGN_RIGHT, TRUE);
- tree_view_column(tree_view, CYL_HE, "He%", percentage_data_func, PANGO_ALIGN_RIGHT, TRUE);
+ tree_view_column(tree_view, CYL_DESC, "Type", NULL, ALIGN_LEFT | UNSORTABLE);
+ tree_view_column(tree_view, CYL_SIZE, "Size", size_data_func, ALIGN_RIGHT | UNSORTABLE);
+ tree_view_column(tree_view, CYL_WORKP, "MaxPress", pressure_data_func, ALIGN_RIGHT | UNSORTABLE);
+ tree_view_column(tree_view, CYL_STARTP, "Start", pressure_data_func, ALIGN_RIGHT | UNSORTABLE);
+ tree_view_column(tree_view, CYL_ENDP, "End", pressure_data_func, ALIGN_RIGHT | UNSORTABLE);
+ tree_view_column(tree_view, CYL_O2, "O" UTF8_SUBSCRIPT_2 "%", percentage_data_func, ALIGN_RIGHT | UNSORTABLE);
+ tree_view_column(tree_view, CYL_HE, "He%", percentage_data_func, ALIGN_RIGHT | UNSORTABLE);
return tree_view;
}