[nautilus] files-view: select first file even when directory not fully loaded



commit 298cdcce8b44779dff943e68ab4c99ec100247ae
Author: Carlos Soriano <csoriano gnome org>
Date:   Thu Mar 3 11:12:58 2016 +0100

    files-view: select first file even when directory not fully loaded
    
    Currently we were waiting until the view was fully loaded to select the
    first file.
    
    This is fine when only navigating.
    
    However, for search, we actually want to select the first file in order
    to allow the user to open right away the most relevant file.
    
    Let's see if this brings problems on icons jumping in large directories,
    but I hope it doesn't in the most common cases.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=762595

 src/nautilus-files-view.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index f91885d..8043a84 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -3654,6 +3654,9 @@ display_pending_files (NautilusFilesView *view)
         process_new_files (view);
         process_old_files (view);
 
+        if (!nautilus_files_view_get_selection (NAUTILUS_VIEW (view)))
+                nautilus_files_view_select_first (view);
+
         if (view->details->model != NULL
             && nautilus_directory_are_all_files_seen (view->details->model)
             && g_hash_table_size (view->details->non_ready_files) == 0) {


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