[nautilus] shell-search-provider: override hidden files search only for overview

commit 36f512fe19805b2c9764c736ba326217ace9f3e5
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date:   Fri Jul 20 18:41:23 2018 +0200

    shell-search-provider: override hidden files search only for overview
    We should limit search to hidden files only when searching in overview, not when
    nautilus is launched from the shell search results.
    In fact, while it make sense to present only main results in the overview search,
    it's better to follow user preferences when clicking on the nautilus icon on
    search results, as we expect that nautilus view to go deeper if the user is fine
    with searching into hidden files.

 src/nautilus-shell-search-provider.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index 0789f0861..7dbcc7c9f 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -437,7 +437,6 @@ shell_query_new (gchar **terms)
     home = g_file_new_for_path (g_get_home_dir ());
     query = nautilus_query_new ();
-    nautilus_query_set_show_hidden_files (query, FALSE);
     nautilus_query_set_recursive (query, NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY);
     nautilus_query_set_text (query, terms_joined);
     nautilus_query_set_location (query, home);
@@ -464,6 +463,7 @@ execute_search (NautilusShellSearchProvider  *self,
     query = shell_query_new (terms);
+    nautilus_query_set_show_hidden_files (query, FALSE);
     pending_search = g_slice_new0 (PendingSearch);
     pending_search->invocation = g_object_ref (invocation);

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