summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>2016-01-12 20:35:07 -0200
committerCarlos Soriano <csoriano@gnome.org>2016-02-02 20:43:04 +0100
commite84bc6271936fad312404f03502ed610e51f5116 (patch)
tree33cf7fee949ca9431f1af216ba800eb797922095
parentcb7c77a8acf857c3bf16e73bc7beba4b9d09faac (diff)
downloadnautilus-e84bc6271936fad312404f03502ed610e51f5116.tar.gz
search-directory: use the query's recursive flag
NautilusSearchDirectory decides whether the search will be done recursively or not by manually checking if the current directory is remote or not. Since the NautilusQuery::recursive flag already does this job through NautilusQueryEditor, the manual check is obsolete. Fix that by using the query's recursive flag instead.
-rw-r--r--libnautilus-private/nautilus-search-directory.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/libnautilus-private/nautilus-search-directory.c b/libnautilus-private/nautilus-search-directory.c
index 9fca6a339..3ad2d2d69 100644
--- a/libnautilus-private/nautilus-search-directory.c
+++ b/libnautilus-private/nautilus-search-directory.c
@@ -26,7 +26,6 @@
#include "nautilus-file.h"
#include "nautilus-file-private.h"
#include "nautilus-file-utilities.h"
-#include "nautilus-global-preferences.h"
#include "nautilus-search-provider.h"
#include "nautilus-search-engine.h"
#include "nautilus-search-engine-model.h"
@@ -157,7 +156,6 @@ start_search (NautilusSearchDirectory *search)
{
NautilusSearchEngineModel *model_provider;
NautilusSearchEngineSimple *simple_provider;
- NautilusFile *directory_as_file;
gboolean recursive;
if (!search->details->query) {
@@ -184,12 +182,7 @@ start_search (NautilusSearchDirectory *search)
nautilus_search_engine_model_set_model (model_provider, search->details->base_model);
simple_provider = nautilus_search_engine_get_simple_provider (search->details->engine);
- directory_as_file = nautilus_directory_get_corresponding_file (search->details->base_model);
- /* It's too slow to search recursively on locations that are on the network. So
- * for that case, just search in the current directory */
- recursive = g_settings_get_boolean (nautilus_preferences, "enable-recursive-search") &&
- !nautilus_directory_is_remote (search->details->base_model);
- g_object_unref (directory_as_file);
+ recursive = nautilus_query_get_recursive (search->details->query);
g_object_set (simple_provider, "recursive", recursive, NULL);
reset_file_list (search);