aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-tp-chat.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-04-26 19:42:03 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2012-05-02 17:31:44 +0800
commit55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21 (patch)
tree3e67a9f8194bc59d0f6e8919728b11ef596ffbfa /libempathy/empathy-tp-chat.c
parente889f1ac2825527fdc80cf22926817e3992d7421 (diff)
downloadgsoc2013-empathy-55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21.tar
gsoc2013-empathy-55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21.tar.gz
gsoc2013-empathy-55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21.tar.bz2
gsoc2013-empathy-55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21.tar.lz
gsoc2013-empathy-55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21.tar.xz
gsoc2013-empathy-55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21.tar.zst
gsoc2013-empathy-55b19d4afad4a05e4e90ab4e4a57bbb1e2734d21.zip
tp-chat: add the 'members-changed' signal
It uses to be implemented by the EmpathyContactList interface which has been removed. https://bugzilla.gnome.org/show_bug.cgi?id=674864
Diffstat (limited to 'libempathy/empathy-tp-chat.c')
-rw-r--r--libempathy/empathy-tp-chat.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 29618cb5b..4069da484 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -82,6 +82,7 @@ enum
CHAT_STATE_CHANGED,
MESSAGE_ACKNOWLEDGED,
SIG_MEMBER_RENAMED,
+ SIG_MEMBERS_CHANGED,
LAST_SIGNAL
};
@@ -855,7 +856,7 @@ tp_chat_got_added_contacts_cb (TpConnection *connection,
{
self->priv->members = g_list_prepend (self->priv->members,
g_object_ref (contact));
- g_signal_emit_by_name (chat, "members-changed",
+ g_signal_emit (self, signals[SIG_MEMBERS_CHANGED], 0,
contact, NULL, 0, NULL, TRUE);
}
}
@@ -1040,9 +1041,8 @@ tp_chat_group_members_changed_cb (TpChannel *channel,
if (contact != NULL)
{
- g_signal_emit_by_name (self, "members-changed", contact,
- actor_contact, reason, message,
- FALSE);
+ g_signal_emit (self, signals[SIG_MEMBERS_CHANGED], 0,
+ contact, actor_contact, reason, message, FALSE);
g_object_unref (contact);
}
}
@@ -1289,6 +1289,14 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
4, EMPATHY_TYPE_CONTACT, EMPATHY_TYPE_CONTACT,
G_TYPE_UINT, G_TYPE_STRING);
+ signals[SIG_MEMBERS_CHANGED] = g_signal_new ("members-changed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE,
+ 5, EMPATHY_TYPE_CONTACT, EMPATHY_TYPE_CONTACT,
+ G_TYPE_UINT, G_TYPE_STRING, G_TYPE_BOOLEAN);
+
g_type_class_add_private (object_class, sizeof (EmpathyTpChatPrivate));
}