[tracker/miner-fs-refactor: 108/127] libtracker-miner, notifier: report again status when crawling
- From: Martyn James Russell <mr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/miner-fs-refactor: 108/127] libtracker-miner, notifier: report again status when crawling
- Date: Wed, 7 Dec 2011 10:46:01 +0000 (UTC)
commit 8b4cac534b65ea1e08638044d59199e7648d83d6
Author: Carlos Garnacho <carlos lanedo com>
Date: Fri Oct 21 17:59:43 2011 +0200
libtracker-miner, notifier: report again status when crawling
This brings back the "Crawling directory '...'" messages reported
via the Status DBus property.
src/libtracker-miner/tracker-miner-fs.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-miner-fs.c b/src/libtracker-miner/tracker-miner-fs.c
index 0a1444e..2d113d3 100644
--- a/src/libtracker-miner/tracker-miner-fs.c
+++ b/src/libtracker-miner/tracker-miner-fs.c
@@ -2605,6 +2605,29 @@ file_notifier_directory_started (TrackerFileNotifier *notifier,
gpointer user_data)
{
TrackerMinerFS *fs = user_data;
+ TrackerDirectoryFlags flags;
+ gchar *str, *uri;
+
+ uri = g_file_get_uri (directory);
+ tracker_indexing_tree_get_root (fs->priv->indexing_tree,
+ directory, &flags);
+
+ if ((flags & TRACKER_DIRECTORY_FLAG_RECURSE) != 0) {
+ str = g_strdup_printf ("Crawling recursively directory '%s'", uri);
+ } else {
+ str = g_strdup_printf ("Crawling single directory '%s'", uri);
+ }
+
+ /* Always set the progress here to at least 1%, and the remaining time
+ * to -1 as we cannot guess during crawling (we don't know how many directories
+ * we will find) */
+ g_object_set (fs,
+ "progress", 0.01,
+ "status", str,
+ "remaining-time", -1,
+ NULL);
+ g_free (str);
+ g_free (uri);
if (!fs->priv->timer) {
fs->priv->timer = g_timer_new ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]