[tracker/mainloop-fixes] libtracker-bus, sparql, direct: Mainloop fixes
- From: Philip Van Hoof <pvanhoof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/mainloop-fixes] libtracker-bus, sparql, direct: Mainloop fixes
- Date: Tue, 12 Oct 2010 13:35:55 +0000 (UTC)
commit 5e68e63dca1d532fedf03737aab73fd5d21e9696
Author: Philip Van Hoof <philip codeminded be>
Date: Tue Oct 12 15:35:26 2010 +0200
libtracker-bus, sparql, direct: Mainloop fixes
src/libtracker-bus/tracker-bus.vala | 2 ++
src/libtracker-direct/tracker-direct.vala | 1 +
src/libtracker-sparql/tracker-backend.vala | 2 ++
3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/libtracker-bus/tracker-bus.vala b/src/libtracker-bus/tracker-bus.vala
index 6008134..cbf3c84 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-direct/tracker-direct.vala b/src/libtracker-direct/tracker-direct.vala
index 7bc2515..3f9dc4c 100644
--- a/src/libtracker-direct/tracker-direct.vala
+++ b/src/libtracker-direct/tracker-direct.vala
@@ -27,6 +27,7 @@ public class Tracker.Direct.Connection : Tracker.Sparql.Connection {
try {
var connection = DBus.Bus.get (DBus.BusType.SESSION);
+ connection.get_connection().setup_with_main(MainContext.get_thread_default());
} catch (DBus.Error e) {
throw new Sparql.Error.INTERNAL ("Unable to initialize database");
}
diff --git a/src/libtracker-sparql/tracker-backend.vala b/src/libtracker-sparql/tracker-backend.vala
index 3ebf9fc..4967be5 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]