[Xfce4-commits] <thunar:master> Scroll to first file with pattern select.
Nick Schermer
noreply at xfce.org
Tue Oct 2 19:42:01 CEST 2012
Updating branch refs/heads/master
to 77c7dba029442c1c5c198497ca85ed3da099a80b (commit)
from 02de74a76f493837a12925248187206651f26439 (commit)
commit 77c7dba029442c1c5c198497ca85ed3da099a80b
Author: Nick Schermer <nick at xfce.org>
Date: Tue Oct 2 18:51:40 2012 +0200
Scroll to first file with pattern select.
thunar/thunar-standard-view.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/thunar/thunar-standard-view.c b/thunar/thunar-standard-view.c
index c1b2975..df1a2b8 100644
--- a/thunar/thunar-standard-view.c
+++ b/thunar/thunar-standard-view.c
@@ -2175,6 +2175,11 @@ thunar_standard_view_action_select_by_pattern (GtkAction *action,
/* select all files that match the entered pattern */
paths = thunar_list_model_get_paths_for_pattern (standard_view->model, gtk_entry_get_text (GTK_ENTRY (entry)));
THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->unselect_all (standard_view);
+
+ /* set the cursor and scroll to the first selected item */
+ if (paths != NULL)
+ THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->set_cursor (standard_view, g_list_last (paths)->data, FALSE);
+
for (lp = paths; lp != NULL; lp = lp->next)
{
THUNAR_STANDARD_VIEW_GET_CLASS (standard_view)->select_path (standard_view, lp->data);
More information about the Xfce4-commits
mailing list