[PATCH 2/2] Indicate to the user a default divelist sorting order
Lubomir I. Ivanov
neolit123 at gmail.com
Wed Feb 20 05:47:23 PST 2013
From: "Lubomir I. Ivanov" <neolit123 at gmail.com>
Each time subsurface starts there is supposedly no sorting order
(or divelist column) specified by the UI, yet the actual column is '#'
(or dive number column), since its the *only* column which allows
trips to be visible. If the user selects a different sorting order
then he has no idea which column was the one who had the trips visible.
"Where did all those 'trip' things go?"
This can be a bit confusing...
Lets provide indication by calling gtk_tree_view_column_set_sort_indicator().
Also call gtk_tree_view_column_set_sort_order() to specify a descending
order.
Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
divelist.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/divelist.c b/divelist.c
index bf9d18c..da82116 100644
--- a/divelist.c
+++ b/divelist.c
@@ -2591,6 +2591,8 @@ GtkWidget *dive_list_create(void)
dive_list.otu = divelist_column(&dive_list, dl_column + DIVE_OTU);
dive_list.maxcns = divelist_column(&dive_list, dl_column + DIVE_MAXCNS);
dive_list.location = divelist_column(&dive_list, dl_column + DIVE_LOCATION);
+ gtk_tree_view_column_set_sort_indicator(dive_list.nr, TRUE);
+ gtk_tree_view_column_set_sort_order(dive_list.nr, GTK_SORT_DESCENDING);
/* now add the GPS icon to the location column */
tree_view_column_add_pixbuf(dive_list.tree_view, gpsicon_data_func, dive_list.location);
--
1.7.11.msysgit.0
More information about the subsurface
mailing list