aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2017-08-19 17:37:46 -0700
committerJon Lund Steffensen <jonlst@gmail.com>2017-08-19 17:37:49 -0700
commit52d9a73d365b8b7f37847c15a03124b472a77b16 (patch)
tree4e6af265c8736a7349bb2ec7f7eab5635d0edf56 /src
parentMerge pull request #500 from jonls/continuous-location (diff)
downloadredshift-ng-52d9a73d365b8b7f37847c15a03124b472a77b16.tar.gz
redshift-ng-52d9a73d365b8b7f37847c15a03124b472a77b16.tar.bz2
redshift-ng-52d9a73d365b8b7f37847c15a03124b472a77b16.tar.xz
geoclue2: Use existing connection object
Use existing connection object when creating proxies.
Diffstat (limited to 'src')
-rw-r--r--src/location-geoclue2.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/location-geoclue2.c b/src/location-geoclue2.c
index 9641507..94a536e 100644
--- a/src/location-geoclue2.c
+++ b/src/location-geoclue2.c
@@ -68,8 +68,8 @@ geoclue_client_signal_cb(GDBusProxy *client, gchar *sender_name,
/* Obtain location */
GError *error = NULL;
- GDBusProxy *location = g_dbus_proxy_new_for_bus_sync(
- G_BUS_TYPE_SYSTEM,
+ GDBusProxy *location = g_dbus_proxy_new_sync(
+ g_dbus_proxy_get_connection(client),
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"org.freedesktop.GeoClue2",
@@ -111,8 +111,8 @@ on_name_appeared(GDBusConnection *conn, const gchar *name,
/* Obtain GeoClue Manager */
GError *error = NULL;
- GDBusProxy *geoclue_manager = g_dbus_proxy_new_for_bus_sync(
- G_BUS_TYPE_SYSTEM,
+ GDBusProxy *geoclue_manager = g_dbus_proxy_new_sync(
+ conn,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"org.freedesktop.GeoClue2",
@@ -149,8 +149,8 @@ on_name_appeared(GDBusConnection *conn, const gchar *name,
/* Obtain GeoClue client */
error = NULL;
- GDBusProxy *geoclue_client = g_dbus_proxy_new_for_bus_sync(
- G_BUS_TYPE_SYSTEM,
+ GDBusProxy *geoclue_client = g_dbus_proxy_new_sync(
+ conn,
G_DBUS_PROXY_FLAGS_NONE,
NULL,
"org.freedesktop.GeoClue2",