[PATCH 3/5] tracker: support notification without per device mode
- From: lionel g landwerlin linux intel com
- To: grilo-list gnome org
- Subject: [PATCH 3/5] tracker: support notification without per device mode
- Date: Tue, 8 Feb 2011 19:49:31 +0000
From: Lionel Landwerlin <lionel g landwerlin linux intel com>
Signed-off-by: Lionel Landwerlin <lionel g landwerlin linux intel com>
---
src/tracker/grl-tracker.c | 19 +++++++++++++------
1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/src/tracker/grl-tracker.c b/src/tracker/grl-tracker.c
index 2ac5254..b631a81 100644
--- a/src/tracker/grl-tracker.c
+++ b/src/tracker/grl-tracker.c
@@ -390,9 +390,11 @@ tracker_evt_update_orphan_item_cb (GObject *object,
GRL_DEBUG ("\tend of parsing...");
}
- /* Once all items have been processed, add new sources and we're
- done. */
- tracker_evt_postupdate_sources (evt);
+ if (tracker_per_device_source) {
+ /* Once all items have been processed, add new sources and we're
+ done. */
+ tracker_evt_postupdate_sources (evt);
+ }
return;
}
@@ -775,7 +777,12 @@ tracker_dbus_signal_cb (GDBusConnection *connection,
GRL_DEBUG ("\t%u elements updated (list)",
g_list_length (evt->altered_items_list));
- tracker_evt_preupdate_sources (evt);
+ if (tracker_per_device_source) {
+ tracker_evt_preupdate_sources (evt);
+ } else {
+ tracker_evt_update_items (evt);
+ tracker_evt_update_orphans (evt);
+ }
}
static void
@@ -872,12 +879,12 @@ tracker_get_connection_cb (GObject *object,
tracker_connection = tracker_sparql_connection_get_finish (res, NULL);
if (tracker_connection != NULL) {
+ tracker_dbus_start_watch ();
+
if (tracker_per_device_source == TRUE) {
/* Let's discover available data sources. */
GRL_DEBUG ("per device source mode");
- tracker_dbus_start_watch ();
-
volume_monitor = g_volume_monitor_get ();
tracker_sparql_connection_query_async (tracker_connection,
--
1.7.2.3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]