telepathy-idle: im-manager: use tp_base_channel_is_destroyed()
Will Thompson
wjt at kemper.freedesktop.org
Wed Nov 14 11:12:53 PST 2012
Module: telepathy-idle
Branch: master
Commit: 8a3a8ba64195afd03c291282233d3b28abfd85d2
URL: http://cgit.freedesktop.org/telepathy/telepathy-idle/commit/?id=8a3a8ba64195afd03c291282233d3b28abfd85d2
Author: Will Thompson <will.thompson at collabora.co.uk>
Date: Fri Nov 9 14:15:10 2012 +0000
im-manager: use tp_base_channel_is_destroyed()
This is equivalent but neater.
---
src/idle-im-manager.c | 11 +++--------
1 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/idle-im-manager.c b/src/idle-im-manager.c
index 1d3a73c..71fe7a0 100644
--- a/src/idle-im-manager.c
+++ b/src/idle-im-manager.c
@@ -387,21 +387,16 @@ _im_channel_closed_cb (IdleIMChannel *chan,
{
IdleIMManager *self = IDLE_IM_MANAGER (user_data);
IdleIMManagerPrivate *priv = IDLE_IM_MANAGER_GET_PRIVATE (self);
- TpHandle handle;
+ TpBaseChannel *base = TP_BASE_CHANNEL (chan);
tp_channel_manager_emit_channel_closed_for_object (self,
TP_EXPORTABLE_CHANNEL (chan));
if (priv->channels)
{
- gboolean really_destroyed;
-
- g_object_get (chan,
- "handle", &handle,
- "channel-destroyed", &really_destroyed,
- NULL);
+ TpHandle handle = tp_base_channel_get_target_handle (base);
- if (really_destroyed)
+ if (tp_base_channel_is_destroyed (base))
{
IDLE_DEBUG ("removing channel with handle %u", handle);
g_hash_table_remove (priv->channels, GUINT_TO_POINTER (handle));
More information about the telepathy-commits
mailing list