[nautilus] search-engine: Reset duplicates cache when search finishes



commit 41714d98775b60fbf5ef48e2addd6e1a07a7a878
Author: Florian MÃllner <fmuellner gnome org>
Date:   Thu Sep 6 14:50:38 2012 +0200

    search-engine: Reset duplicates cache when search finishes
    
    Fixing the handling of duplicated search results in commit 7f04862
    exposed a different bug: as the duplicates cache is never reset,
    previously matched results are ignored in subsequent searches (e.g.
    when adding/removing characters to the search terms that should not
    change the result set).
    
    https://bugzilla.gnome.org/show_bug.cgi?id=683495

 libnautilus-private/nautilus-search-engine.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-search-engine.c b/libnautilus-private/nautilus-search-engine.c
index d7e4e72..a3a0184 100644
--- a/libnautilus-private/nautilus-search-engine.c
+++ b/libnautilus-private/nautilus-search-engine.c
@@ -153,6 +153,7 @@ search_provider_error (NautilusSearchProvider *provider,
 	if (engine->details->providers_error == engine->details->num_providers) {
 		nautilus_search_provider_error (NAUTILUS_SEARCH_PROVIDER (engine),
 						_("Unable to complete the requested search"));
+		g_hash_table_remove_all (engine->details->uris);
 	}
 }
 
@@ -162,8 +163,10 @@ search_provider_finished (NautilusSearchProvider *provider,
 
 {
 	engine->details->providers_finished++;
-	if (engine->details->providers_finished == engine->details->num_providers)
+	if (engine->details->providers_finished == engine->details->num_providers) {
 		nautilus_search_provider_finished (NAUTILUS_SEARCH_PROVIDER (engine));
+		g_hash_table_remove_all (engine->details->uris);
+	}
 }
 
 static void



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