aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-03-30 20:58:19 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-04-08 18:34:57 +0800
commit005b8cbca64b9b6d71cea5dcab3b53ed89849e13 (patch)
tree471919eca449d07e873bfece1450174ebca62275 /libempathy
parent8a83a0fed90f5ad0061e1cf7aae573139f314206 (diff)
downloadgsoc2013-empathy-005b8cbca64b9b6d71cea5dcab3b53ed89849e13.tar
gsoc2013-empathy-005b8cbca64b9b6d71cea5dcab3b53ed89849e13.tar.gz
gsoc2013-empathy-005b8cbca64b9b6d71cea5dcab3b53ed89849e13.tar.bz2
gsoc2013-empathy-005b8cbca64b9b6d71cea5dcab3b53ed89849e13.tar.lz
gsoc2013-empathy-005b8cbca64b9b6d71cea5dcab3b53ed89849e13.tar.xz
gsoc2013-empathy-005b8cbca64b9b6d71cea5dcab3b53ed89849e13.tar.zst
gsoc2013-empathy-005b8cbca64b9b6d71cea5dcab3b53ed89849e13.zip
Use NewChannels signal to catch group channels (#614236)
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-tp-contact-list.c32
1 files changed, 12 insertions, 20 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c
index cce5f8e1e..a4a948d79 100644
--- a/libempathy/empathy-tp-contact-list.c
+++ b/libempathy/empathy-tp-contact-list.c
@@ -700,21 +700,6 @@ tp_contact_list_store_group_members_changed_cb (TpChannel *channel,
}
static void
-tp_contact_list_new_channel_cb (TpConnection *proxy,
- const gchar *object_path,
- const gchar *channel_type,
- guint handle_type,
- guint handle,
- gboolean suppress_handler,
- gpointer user_data,
- GObject *list)
-{
- tp_contact_list_group_add_channel (EMPATHY_TP_CONTACT_LIST (list),
- object_path, channel_type,
- handle_type, handle);
-}
-
-static void
tp_contact_list_list_channels_cb (TpConnection *connection,
const GPtrArray *channels,
const GError *error,
@@ -886,6 +871,18 @@ new_channels_cb (TpConnection *conn,
got_list_channel (list, channel);
g_object_unref (channel);
}
+ else if (handle_type == TP_HANDLE_TYPE_GROUP) {
+ TpHandle handle;
+
+ handle = tp_asv_get_uint32 (properties,
+ TP_IFACE_CHANNEL ".TargetHandle", NULL);
+ if (handle == 0)
+ return;
+
+ tp_contact_list_group_add_channel (list,
+ path, TP_IFACE_CHANNEL_TYPE_CONTACT_LIST,
+ TP_HANDLE_TYPE_GROUP, handle);
+ }
}
}
@@ -974,11 +971,6 @@ tp_contact_list_constructed (GObject *list)
tp_contact_list_list_channels_cb,
NULL, NULL,
list);
-
- tp_cli_connection_connect_to_new_channel (priv->connection,
- tp_contact_list_new_channel_cb,
- NULL, NULL,
- list, NULL);
}
static void