[Xfce4-commits] [xfce/thunar] 01/01: Restore file selection when changing sort order (bug #9886)
noreply at xfce.org
noreply at xfce.org
Tue Mar 31 21:41:31 CEST 2015
This is an automated email from the git hooks/post-receive script.
hjudt pushed a commit to branch master
in repository xfce/thunar.
commit 079712fb0472b4cf5add1c206164b90f18554abe
Author: Harald Judt <h.judt at gmx.at>
Date: Tue Mar 31 21:39:11 2015 +0200
Restore file selection when changing sort order (bug #9886)
---
thunar/thunar-standard-view.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index 0ebfa62..6700a94 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -3747,12 +3747,18 @@ static void
thunar_standard_view_sort_column_changed (GtkTreeSortable *tree_sortable,
ThunarStandardView *standard_view)
{
- GtkSortType sort_order;
- gint sort_column;
+ ThunarComponent *component;
+ GtkSortType sort_order;
+ gint sort_column;
+ GList *selected_files;
_thunar_return_if_fail (GTK_IS_TREE_SORTABLE (tree_sortable));
_thunar_return_if_fail (THUNAR_IS_STANDARD_VIEW (standard_view));
+ component = THUNAR_COMPONENT (standard_view);
+
+ selected_files = thunar_g_file_list_copy (thunar_component_get_selected_files (component));
+
/* determine the new sort column and sort order */
if (gtk_tree_sortable_get_sort_column_id (tree_sortable, &sort_column, &sort_order))
{
@@ -3762,6 +3768,9 @@ thunar_standard_view_sort_column_changed (GtkTreeSortable *tree_sortable,
"last-sort-order", sort_order,
NULL);
}
+
+ thunar_component_set_selected_files (component, selected_files);
+ thunar_g_file_list_free (selected_files);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list