[tracker/mainloop-fixes] libtracker-bus, sparql, direct: Mainloop fixes



commit b7be34d83d8aee9854a635696142316acb9b0aee
Author: Philip Van Hoof <philip codeminded be>
Date:   Tue Oct 12 17:20:31 2010 +0200

    libtracker-bus, sparql, direct: Mainloop fixes
    
    Conflicts:
    
    	src/libtracker-direct/tracker-direct.vala

 src/libtracker-bus/tracker-bus.vala        |    2 ++
 src/libtracker-sparql/tracker-backend.vala |    2 ++
 2 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index ce3f941..c8fba06 100644
--- a/src/libtracker-bus/tracker-bus.vala
+++ b/src/libtracker-bus/tracker-bus.vala
@@ -47,6 +47,8 @@ public class Tracker.Bus.Connection : Tracker.Sparql.Connection {
 		try {
 			connection = DBus.Bus.get (DBus.BusType.SESSION);
 
+			connection.get_connection().setup_with_main(MainContext.get_thread_default());
+
 			// FIXME: Ideally we would just get these as and when we need them
 			resources_object = (Resources) connection.get_object (TRACKER_DBUS_SERVICE,
 			                                                      TRACKER_DBUS_OBJECT_RESOURCES,
diff --git a/src/libtracker-sparql/tracker-backend.vala b/src/libtracker-sparql/tracker-backend.vala
index 64c30df..08986e0 100644
--- a/src/libtracker-sparql/tracker-backend.vala
+++ b/src/libtracker-sparql/tracker-backend.vala
@@ -61,6 +61,7 @@ class Tracker.Sparql.Backend : Connection {
 	requires (is_constructed) {
 		try {
 			var connection = DBus.Bus.get (DBus.BusType.SESSION);
+			connection.get_connection().setup_with_main(MainContext.get_thread_default());
 			var status = (Tracker.Backend.Status) connection.get_object (TRACKER_DBUS_SERVICE,
 			                                                             TRACKER_DBUS_OBJECT_STATUS,
 			                                                             TRACKER_DBUS_INTERFACE_STATUS);
@@ -81,6 +82,7 @@ class Tracker.Sparql.Backend : Connection {
 	requires (is_constructed) {
 		try {
 			var connection = DBus.Bus.get (DBus.BusType.SESSION);
+			connection.get_connection().setup_with_main(MainContext.get_thread_default());
 			var status = (Tracker.Backend.Status) connection.get_object (TRACKER_DBUS_SERVICE,
 			                                                             TRACKER_DBUS_OBJECT_STATUS,
 			                                                             TRACKER_DBUS_INTERFACE_STATUS);



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