[tracker/libtracker-miner] Fixed finished signal causing app to exit
- From: Martyn James Russell <mr src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [tracker/libtracker-miner] Fixed finished signal causing app to exit
- Date: Wed, 19 Aug 2009 14:27:08 +0000 (UTC)
commit bd176b63e4c7e55aada8ec2ea7196707695895c4
Author: Martyn Russell <martyn imendio com>
Date: Wed Aug 19 13:56:23 2009 +0100
Fixed finished signal causing app to exit
src/libtracker-miner/tracker-marshal.list | 1 +
src/libtracker-miner/tracker-miner-process.c | 15 ++++++++-------
src/tracker-miner-fs/tracker-miner-main.c | 26 ++++++++++++--------------
3 files changed, 21 insertions(+), 21 deletions(-)
---
diff --git a/src/libtracker-miner/tracker-marshal.list b/src/libtracker-miner/tracker-marshal.list
index 8f0274b..1cd2675 100644
--- a/src/libtracker-miner/tracker-marshal.list
+++ b/src/libtracker-miner/tracker-marshal.list
@@ -1,6 +1,7 @@
VOID:OBJECT,BOOLEAN
VOID:OBJECT,OBJECT,BOOLEAN,BOOLEAN
VOID:UINT,UINT,UINT,UINT
+VOID:DOUBLE,UINT,UINT,UINT,UINT
VOID:STRING,DOUBLE
BOOL:OBJECT,OBJECT
BOOL:OBJECT
diff --git a/src/libtracker-miner/tracker-miner-process.c b/src/libtracker-miner/tracker-miner-process.c
index 5fe820d..b7c6837 100644
--- a/src/libtracker-miner/tracker-miner-process.c
+++ b/src/libtracker-miner/tracker-miner-process.c
@@ -198,9 +198,10 @@ tracker_miner_process_class_init (TrackerMinerProcessClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (TrackerMinerProcessClass, finished),
NULL, NULL,
- tracker_marshal_VOID__UINT_UINT_UINT_UINT,
+ tracker_marshal_VOID__DOUBLE_UINT_UINT_UINT_UINT,
G_TYPE_NONE,
- 4,
+ 5,
+ G_TYPE_DOUBLE,
G_TYPE_UINT,
G_TYPE_UINT,
G_TYPE_UINT,
@@ -1040,6 +1041,8 @@ process_directories_start (TrackerMinerProcess *process)
static void
process_directories_stop (TrackerMinerProcess *process)
{
+ gdouble elapsed = 0.0;
+
if (process->private->finished_directories) {
return;
}
@@ -1056,17 +1059,14 @@ process_directories_stop (TrackerMinerProcess *process)
}
if (process->private->timer) {
+ elapsed = g_timer_elapsed (process->private->timer, NULL);
g_timer_destroy (process->private->timer);
process->private->timer = NULL;
}
} else {
- gdouble elapsed;
-
if (process->private->timer) {
- g_timer_stop (process->private->timer);
elapsed = g_timer_elapsed (process->private->timer, NULL);
- } else {
- elapsed = 0;
+ g_timer_stop (process->private->timer);
}
g_message ("FS time taken : %4.4f seconds",
@@ -1082,6 +1082,7 @@ process_directories_stop (TrackerMinerProcess *process)
g_message ("--------------------------------------------------\n");
g_signal_emit (process, signals[FINISHED], 0,
+ elapsed,
process->private->total_directories_found,
process->private->total_directories_ignored,
process->private->total_files_found,
diff --git a/src/tracker-miner-fs/tracker-miner-main.c b/src/tracker-miner-fs/tracker-miner-main.c
index 6f66684..93acbbe 100644
--- a/src/tracker-miner-fs/tracker-miner-main.c
+++ b/src/tracker-miner-fs/tracker-miner-main.c
@@ -185,20 +185,18 @@ initialize_priority (void)
}
static void
-indexer_finished_cb (TrackerIndexer *indexer,
- gdouble seconds_elapsed,
- guint items_processed,
- guint items_indexed,
- gboolean interrupted,
- gpointer user_data)
+miner_applications_finished_cb (TrackerIndexer *indexer,
+ gdouble seconds_elapsed,
+ guint total_directories_found,
+ guint total_directories_ignored,
+ guint total_files_found,
+ guint total_files_ignored,
+ gpointer user_data)
{
- g_message ("Finished indexing sent items");
-
- if (interrupted) {
- g_message ("Indexer was told to shutdown");
- g_main_loop_quit (main_loop);
- return;
- }
+ g_message ("Finished applications, seconds:%f, total directories:%d, total files:%d",
+ seconds_elapsed,
+ total_directories_found + total_directories_ignored,
+ total_files_found + total_files_ignored);
}
static void
@@ -319,7 +317,7 @@ main (gint argc, gchar *argv[])
/* Create the indexer and run the main loop */
g_signal_connect (miner_applications, "finished",
- G_CALLBACK (indexer_finished_cb),
+ G_CALLBACK (miner_applications_finished_cb),
NULL);
tracker_miner_start (miner_applications);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]