[tracker/miner-fs-refactor: 107/110] libtracker-miner: Remove fs->priv->is_crawling



commit bca4c7b6ae8808ef967b1a3abd4465f9ab726d09
Author: Carlos Garnacho <carlos lanedo com>
Date:   Fri Oct 21 17:20:32 2011 +0200

    libtracker-miner: Remove fs->priv->is_crawling
    
    This is replaced by tracker_file_notifier_is_active()

 src/libtracker-miner/tracker-miner-fs.c |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 12c6d57..7407784 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -184,8 +184,6 @@ struct _TrackerMinerFSPrivate {
 	                                       * done */
 	guint           shown_totals : 1;     /* TRUE if totals have been shown */
 	guint           is_paused : 1;        /* TRUE if miner is paused */
-	guint           is_crawling : 1;      /* TRUE if currently is crawling
-	                                       * (initial or non-initial) */
 	guint           mtime_checking : 1;   /* TRUE if mtime checks should be done
 	                                       * during initial crawling. */
 	guint           initial_crawling : 1; /* TRUE if initial crawling should be
@@ -1914,11 +1912,7 @@ item_queue_get_next_file (TrackerMinerFS  *fs,
 	*file = NULL;
 	*source_file = NULL;
 
-	if (fs->priv->is_crawling ||
-#if 0
-	    fs->priv->crawl_directories_id != 0 ||
-#endif
-	    tracker_file_notifier_is_active (fs->priv->file_notifier) ||
+	if (tracker_file_notifier_is_active (fs->priv->file_notifier) ||
 	    tracker_task_pool_limit_reached (fs->priv->task_pool) ||
 	    tracker_task_pool_limit_reached (TRACKER_TASK_POOL (fs->priv->sparql_buffer))) {
 		/* There are still pending items to crawl,
@@ -2042,7 +2036,7 @@ item_queue_handlers_cb (gpointer user_data)
 		                                        &items_remaining);
 		seconds_elapsed = g_timer_elapsed (fs->priv->timer, NULL);
 
-		if (!fs->priv->is_crawling) {
+		if (!tracker_file_notifier_is_active (fs->priv->file_notifier)) {
 			gchar *status;
 			gint remaining_time;
 
@@ -2102,7 +2096,7 @@ item_queue_handlers_cb (gpointer user_data)
 	/* Handle queues */
 	switch (queue) {
 	case QUEUE_NONE:
-		if (!fs->priv->is_crawling &&
+		if (!tracker_file_notifier_is_active (fs->priv->file_notifier) &&
 		    tracker_task_pool_get_size (fs->priv->task_pool) == 0) {
 			if (tracker_task_pool_get_size (TRACKER_TASK_POOL (fs->priv->sparql_buffer)) == 0) {
 				/* Print stats and signal finished */
@@ -2243,7 +2237,7 @@ item_queue_handlers_set_up (TrackerMinerFS *fs)
 		return;
 	}
 
-	if (!fs->priv->is_crawling) {
+	if (!tracker_file_notifier_is_active (fs->priv->file_notifier)) {
 		gchar *status;
 		gdouble progress;
 
@@ -3529,7 +3523,7 @@ tracker_miner_fs_has_items_to_process (TrackerMinerFS *fs)
 {
 	g_return_val_if_fail (TRACKER_IS_MINER_FS (fs), FALSE);
 
-	if (fs->priv->is_crawling ||
+	if (tracker_file_notifier_is_active (fs->priv->file_notifier) ||
 	    !tracker_priority_queue_is_empty (fs->priv->items_deleted) ||
 	    !tracker_priority_queue_is_empty (fs->priv->items_created) ||
 	    !tracker_priority_queue_is_empty (fs->priv->items_updated) ||



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