[telepathy-account-widgets/next] TpawConnectionManagers: use TpClientFactory instead of TpDBusDaemon
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [telepathy-account-widgets/next] TpawConnectionManagers: use TpClientFactory instead of TpDBusDaemon
- Date: Thu, 3 Apr 2014 14:29:56 +0000 (UTC)
commit 30158633cc854865e4e4c83030f2754c5814ddbf
Author: Simon McVittie <simon mcvittie collabora co uk>
Date: Wed Apr 2 13:37:49 2014 +0100
TpawConnectionManagers: use TpClientFactory instead of TpDBusDaemon
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=76828
tp-account-widgets/tpaw-connection-managers.c | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/tp-account-widgets/tpaw-connection-managers.c b/tp-account-widgets/tpaw-connection-managers.c
index d7cd8b6..1d00534 100644
--- a/tp-account-widgets/tpaw-connection-managers.c
+++ b/tp-account-widgets/tpaw-connection-managers.c
@@ -53,17 +53,20 @@ struct _TpawConnectionManagersPriv
GList *cms;
- TpDBusDaemon *dbus;
+ TpClientFactory *factory;
};
static void
tpaw_connection_managers_init (TpawConnectionManagers *obj)
{
+ GError *error = NULL;
+
obj->priv = G_TYPE_INSTANCE_GET_PRIVATE ((obj),
TPAW_TYPE_CONNECTION_MANAGERS, TpawConnectionManagersPriv);
- obj->priv->dbus = tp_dbus_daemon_dup (NULL);
- g_assert (obj->priv->dbus != NULL);
+ obj->priv->factory = tp_client_factory_dup (&error);
+ g_assert_no_error (error);
+ g_assert (obj->priv->factory != NULL);
tpaw_connection_managers_update (obj);
@@ -163,9 +166,7 @@ tpaw_connection_managers_dispose (GObject *object)
self->priv->dispose_has_run = TRUE;
- if (self->priv->dbus != NULL)
- g_object_unref (self->priv->dbus);
- self->priv->dbus = NULL;
+ g_clear_object (&self->priv->factory);
tpaw_connection_managers_free_cm_list (self);
@@ -239,7 +240,7 @@ out:
void
tpaw_connection_managers_update (TpawConnectionManagers *self)
{
- tp_list_connection_managers_async (self->priv->dbus,
+ tp_list_connection_managers_async (self->priv->factory,
tpaw_connection_managers_listed_cb,
tp_weak_ref_new (self, NULL, NULL));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]