summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiří Černý <ji.cerny@gmail.com>2019-01-24 21:25:58 +0100
committerAntónio Fernandes <antoniojpfernandes@gmail.com>2019-08-31 16:26:07 +0000
commit4a8ff42c82992c32bbc7b295937a62d618d935d2 (patch)
treecfa2279223d1cf465356984d8bfe8e934fa17960
parent69184ef496aac232f360613e6f695e8e64a549e6 (diff)
downloadnautilus-4a8ff42c82992c32bbc7b295937a62d618d935d2.tar.gz
shell-search-provider: Respect recursive-search preference
In the case when recursive-search preference was different from 'never', when launching a new nautilus window from the shell search, new window's search was always non-recursive. This makes new window's search to respect the global user preference. Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/854
-rw-r--r--src/nautilus-shell-search-provider.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/src/nautilus-shell-search-provider.c b/src/nautilus-shell-search-provider.c
index 14a8cc322..056737478 100644
--- a/src/nautilus-shell-search-provider.c
+++ b/src/nautilus-shell-search-provider.c
@@ -722,20 +722,24 @@ handle_launch_search (NautilusShellSearchProvider2 *skeleton,
{
GApplication *app = g_application_get_default ();
g_autoptr (NautilusQuery) query = shell_query_new (terms);
-
- if (location_settings_search_get_recursive () == NAUTILUS_QUERY_RECURSIVE_NEVER)
+ NautilusQueryRecursive recursive = location_settings_search_get_recursive ();
+
+ /*
+ * If no recursive search is enabled, we still want to be able to
+ * show the same results we presented in the overview when nautilus
+ * is explicitly launched to access to more results, and thus we perform
+ * a query showing results coming from index-based search engines.
+ * Otherwise we respect the global setting for recursivity.
+ */
+ if (recursive == NAUTILUS_QUERY_RECURSIVE_NEVER)
{
- /*
- * If no recursive search is enabled, we still want to be able to
- * show the same results we presented in the overview when nautilus
- * is explicitly launched to access to more results, and thus we perform
- * a query showing results coming from index-based search engines.
- * Otherwise we just respect the user settings.
- * See: https://gitlab.gnome.org/GNOME/nautilus/merge_requests/249
- */
nautilus_query_set_recursive (query,
NAUTILUS_QUERY_RECURSIVE_INDEXED_ONLY);
}
+ else
+ {
+ nautilus_query_set_recursive (query, recursive);
+ }
nautilus_application_search (NAUTILUS_APPLICATION (app), query);