From: Dirk Hohndel Date: Sun, 23 Oct 2011 21:38:33 +0000 (-0700) Subject: Disable sorting by dive number X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=11b62a149b0d65e37a2cedbc93c8e8d84b23e041;p=ext%2Fsubsurface.git Disable sorting by dive number This is based on Linus idea and code - just adding it to my UI branch in case he didn't actually add it to his code... It makes no sense to sort by dive number - every sane person will have dive numbers be chronological; so they can sort by date instead. But removing this option wastes less space and makes the dive list look much better Signed-off-by: Dirk Hohndel --- diff --git a/divelist.c b/divelist.c index 948332f..3ddfb65 100644 --- a/divelist.c +++ b/divelist.c @@ -541,6 +541,7 @@ GtkWidget *dive_list_create(void) gtk_widget_set_size_request(dive_list.tree_view, 200, 200); dive_list.nr = divelist_column(&dive_list, DIVE_NR, "#", NULL, PANGO_ALIGN_RIGHT, TRUE); + gtk_tree_view_column_set_sort_column_id(dive_list.nr, -1); dive_list.date = divelist_column(&dive_list, DIVE_DATE, "Date", date_data_func, PANGO_ALIGN_LEFT, TRUE); dive_list.depth = divelist_column(&dive_list, DIVE_DEPTH, "ft", depth_data_func, PANGO_ALIGN_RIGHT, TRUE); dive_list.duration = divelist_column(&dive_list, DIVE_DURATION, "min", duration_data_func, PANGO_ALIGN_RIGHT, TRUE);