[nautilus] files-view: select first item only when searching



commit 020e405414eea963524c4347767430d46481f9b7
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 7a09095..7435c0c 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -3618,7 +3618,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]