[gdm] display: use a async ctor for slave dbus client
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdm] display: use a async ctor for slave dbus client
- Date: Mon, 6 Jan 2014 19:06:01 +0000 (UTC)
commit 60c531fcd0c961e213c8c2bfc288c71f9750171f
Author: Marc-Antoine Perennou <Marc-Antoine Perennou com>
Date: Sun Jan 5 20:09:26 2014 +0900
display: use a async ctor for slave dbus client
https://bugzilla.gnome.org/show_bug.cgi?id=701758
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine Perennou com>
daemon/gdm-display.c | 32 ++++++++++++++++++++++----------
1 files changed, 22 insertions(+), 10 deletions(-)
---
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c
index b1adae8..dec0718 100644
--- a/daemon/gdm-display.c
+++ b/daemon/gdm-display.c
@@ -289,6 +289,21 @@ on_name_vanished (GDBusConnection *connection,
queue_finish (GDM_DISPLAY (user_data));
}
+static void
+gdm_display_real_set_slave_bus_name_finish (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ GdmDisplay *display = user_data;
+
+ display->priv->slave_bus_proxy = GDM_DBUS_SLAVE (gdm_dbus_slave_proxy_new_finish (res, NULL));
+ g_object_bind_property (G_OBJECT (display->priv->slave_bus_proxy),
+ "session-id",
+ G_OBJECT (display),
+ "session-id",
+ G_BINDING_DEFAULT);
+}
+
static gboolean
gdm_display_real_set_slave_bus_name (GdmDisplay *display,
const char *name,
@@ -310,16 +325,13 @@ gdm_display_real_set_slave_bus_name (GdmDisplay *display,
NULL);
g_clear_object (&display->priv->slave_bus_proxy);
- display->priv->slave_bus_proxy = GDM_DBUS_SLAVE (gdm_dbus_slave_proxy_new_sync
(display->priv->connection,
-
G_DBUS_PROXY_FLAGS_NONE,
- name,
- GDM_SLAVE_PATH,
- NULL, NULL));
- g_object_bind_property (G_OBJECT (display->priv->slave_bus_proxy),
- "session-id",
- G_OBJECT (display),
- "session-id",
- G_BINDING_DEFAULT);
+ gdm_dbus_slave_proxy_new (display->priv->connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+ name,
+ GDM_SLAVE_PATH,
+ NULL,
+ gdm_display_real_set_slave_bus_name_finish,
+ display);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]