[nautilus] shell-search-provider: Respect recursive-search preference
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] shell-search-provider: Respect recursive-search preference
- Date: Sat, 31 Aug 2019 16:53:20 +0000 (UTC)
commit 4a8ff42c82992c32bbc7b295937a62d618d935d2
Author: Jiří Černý <ji cerny gmail com>
Date: Thu Jan 24 21:25:58 2019 +0100
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
src/nautilus-shell-search-provider.c | 24 ++++++++++++++----------
1 file 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]