[nautilus] search-directory: stop the engine when there are no active monitors



commit a78d885027d6a49d712b5589fd79c822edf4e17d
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Sep 8 16:34:26 2011 -0400

    search-directory: stop the engine when there are no active monitors
    
    My understanding of this code suggests the engine should be stopped as
    soon as the active monitors reach zero.
    This fixes the Stop button not working while searching anyway, and
    doesn't seem to cause any collateral damage.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=563163

 libnautilus-private/nautilus-search-directory.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/libnautilus-private/nautilus-search-directory.c b/libnautilus-private/nautilus-search-directory.c
index 43ff7db..304dd66 100644
--- a/libnautilus-private/nautilus-search-directory.c
+++ b/libnautilus-private/nautilus-search-directory.c
@@ -144,8 +144,8 @@ start_or_stop_search_engine (NautilusSearchDirectory *search, gboolean adding)
 		reset_file_list (search);
 
 		nautilus_search_engine_start (search->details->engine);
-	} else if (!adding && !search->details->monitor_list &&
-		   !search->details->pending_callback_list &&
+	} else if (!adding && (!search->details->monitor_list ||
+		   !search->details->pending_callback_list) &&
 		   search->details->engine &&
 		   search->details->search_running) {
 		search->details->search_running = FALSE;



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