From 0a1770b98f8b9661a84b8e968131fc83302cb493 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Fri, 14 Sep 2012 15:00:20 +0100 Subject: [PATCH 14/21] McdAccountManager: use tp_dbus_daemon_register_object dbus_g_connection_register_g_object isn't deprecated, but it's more code. Signed-off-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=55391 --- src/mcd-account-manager.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/mcd-account-manager.c b/src/mcd-account-manager.c index 57796e6..ff05c36 100644 --- a/src/mcd-account-manager.c +++ b/src/mcd-account-manager.c @@ -1475,14 +1475,11 @@ static void register_dbus_service (McdAccountManager *account_manager) { McdAccountManagerPrivate *priv = account_manager->priv; - DBusGConnection *dbus_connection; GError *error = NULL; if (priv->dbus_registered) return; - dbus_connection = tp_proxy_get_dbus_connection (TP_PROXY (priv->dbus_daemon)); - if (!tp_dbus_daemon_request_name (priv->dbus_daemon, TP_ACCOUNT_MANAGER_BUS_NAME, TRUE /* idempotent */, &error)) @@ -1497,10 +1494,9 @@ register_dbus_service (McdAccountManager *account_manager) priv->dbus_registered = TRUE; - if (G_LIKELY (dbus_connection)) - dbus_g_connection_register_g_object (dbus_connection, - TP_ACCOUNT_MANAGER_OBJECT_PATH, - (GObject *)account_manager); + tp_dbus_daemon_register_object (priv->dbus_daemon, + TP_ACCOUNT_MANAGER_OBJECT_PATH, + account_manager); } static void -- 1.7.10.4