summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2016-04-25 18:23:06 +0200
committerCarlos Soriano <csoriano@gnome.org>2016-04-28 11:40:26 +0200
commit5505b4bda2aeb3c6ea9079faf676cc6c1a66531c (patch)
tree0819d92bc4a8488e27a9d11eb75e2e9593b7ad66
parent2ae11252ac13609e6e3278bfc64d7aca06b26733 (diff)
downloadnautilus-5505b4bda2aeb3c6ea9079faf676cc6c1a66531c.tar.gz
files-view: select first item only when searching
Since 2fa597e we select the first item even if the view didn't load all the files. But we were selecting the first item unconditionally. However, it only makes sense to select the first item on the view if the view is searching, not otherwise. This patch makes files view to select the first item only if the view is searching, as we had previously. https://bugzilla.gnome.org/show_bug.cgi?id=765264
-rw-r--r--src/nautilus-files-view.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index caf39cb0c..7bd657a91 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -3654,7 +3654,8 @@ display_pending_files (NautilusFilesView *view)
process_old_files (view);
if (!nautilus_files_view_get_selection (NAUTILUS_VIEW (view)) &&
- !view->details->pending_selection) {
+ !view->details->pending_selection &&
+ nautilus_view_is_searching (NAUTILUS_VIEW (view))) {
nautilus_files_view_select_first (view);
}