[nautilus/gnome-3-20] files-view: select first item only when searching



commit 5505b4bda2aeb3c6ea9079faf676cc6c1a66531c
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Apr 25 18:23:06 2016 +0200

    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

 src/nautilus-files-view.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index caf39cb..7bd657a 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);
 
             }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]