From b635e28ed7d6d192a87a4ffc76cbb2ade1a4c4d0 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 27 Mar 2003 13:39:36 +0000 Subject: [PATCH] r2595: Bugfix: Selections in List View didn't work properly (reported by Stephen Watson). --- ROX-Filer/Help/Changes | 2 ++ ROX-Filer/src/view_details.c | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index 67097bf9..f0d9109b 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -5,6 +5,8 @@ 27-Mar-2003 ~~~~~~~~~~~ Allow dragging a file into a GtkEntry to insert the filename. +Bugfix: Selections in List View didn't work properly (reported by Stephen + Watson). 23-Mar-2003 ~~~~~~~~~~~ diff --git a/ROX-Filer/src/view_details.c b/ROX-Filer/src/view_details.c index 84c812a6..e9670987 100644 --- a/ROX-Filer/src/view_details.c +++ b/ROX-Filer/src/view_details.c @@ -1191,14 +1191,18 @@ static void view_details_select_all(ViewIface *view) { ViewDetails *view_details = (ViewDetails *) view; + view_details->can_change_selection++; gtk_tree_selection_select_all(view_details->selection); + view_details->can_change_selection--; } static void view_details_clear_selection(ViewIface *view) { ViewDetails *view_details = (ViewDetails *) view; + view_details->can_change_selection++; gtk_tree_selection_unselect_all(view_details->selection); + view_details->can_change_selection--; } static int view_details_count_items(ViewIface *view) @@ -1328,7 +1332,9 @@ static void view_details_select_only(ViewIface *view, ViewIter *iter) path = gtk_tree_path_new(); gtk_tree_path_append_index(path, iter->i); + view_details->can_change_selection++; gtk_tree_selection_select_range(view_details->selection, path, path); + view_details->can_change_selection--; gtk_tree_path_free(path); } -- 2.11.4.GIT