From c42d13f5bc1e9283c97dc62401f46895555e8b58 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Wed, 17 Nov 2010 17:25:07 +0000 Subject: [PATCH] fd.o #31664: use tp_dbus_daemon_register_object to avoid deprecated tp_get_bus --- src/ring-media-channel.c | 4 +++- src/ring-text-channel.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ring-media-channel.c b/src/ring-media-channel.c index 1c20a8c..86d8c5e 100644 --- a/src/ring-media-channel.c +++ b/src/ring-media-channel.c @@ -244,6 +244,8 @@ ring_media_channel_constructed(GObject *object) { RingMediaChannel *self = RING_MEDIA_CHANNEL(object); RingMediaChannelPrivate *priv = self->priv; + TpBaseConnection *connection = TP_BASE_CONNECTION(priv->connection); + TpDBusDaemon *bus_daemon = tp_base_connection_get_dbus_daemon(connection); if (G_OBJECT_CLASS(ring_media_channel_parent_class)->constructed) G_OBJECT_CLASS(ring_media_channel_parent_class)->constructed(object); @@ -252,7 +254,7 @@ ring_media_channel_constructed(GObject *object) g_assert(self->call_service); - dbus_g_connection_register_g_object(tp_get_bus(), priv->object_path, object); + tp_dbus_daemon_register_object(bus_daemon, priv->object_path, object); } static void diff --git a/src/ring-text-channel.c b/src/ring-text-channel.c index 4ac770c..813e0df 100644 --- a/src/ring-text-channel.c +++ b/src/ring-text-channel.c @@ -275,6 +275,7 @@ ring_text_channel_constructed(GObject *object) RingTextChannel *self = RING_TEXT_CHANNEL(object); RingTextChannelPrivate *priv = self->priv; TpBaseConnection *connection = TP_BASE_CONNECTION(priv->connection); + TpDBusDaemon *bus_daemon = tp_base_connection_get_dbus_daemon(connection); TpHandleRepoIface *repo = tp_base_connection_get_handles( connection, TP_HANDLE_TYPE_CONTACT); void (*send)(GObject *, TpMessage *, TpMessageSendingFlags) = @@ -291,7 +292,7 @@ ring_text_channel_constructed(GObject *object) priv->destination = ring_text_channel_destination(priv->target_id); - dbus_g_connection_register_g_object(tp_get_bus(), priv->object_path, object); + tp_dbus_daemon_register_object(bus_daemon, priv->object_path, object); tp_message_mixin_init(object, G_STRUCT_OFFSET(RingTextChannel, message), connection); -- 1.7.2.3