aboutsummaryrefslogtreecommitdiffstats
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
commite889f1ac2825527fdc80cf22926817e3992d7421 (patch)
treee2b4e4d831baecbef4f25fbd157fcdd646970a86
parent01dbc394d6249e2517850e38fdc805d1a8eddaa8 (diff)
downloadgsoc2013-empathy-e889f1ac2825527fdc80cf22926817e3992d7421.tar
gsoc2013-empathy-e889f1ac2825527fdc80cf22926817e3992d7421.tar.gz
gsoc2013-empathy-e889f1ac2825527fdc80cf22926817e3992d7421.tar.bz2
gsoc2013-empathy-e889f1ac2825527fdc80cf22926817e3992d7421.tar.lz
gsoc2013-empathy-e889f1ac2825527fdc80cf22926817e3992d7421.tar.xz
gsoc2013-empathy-e889f1ac2825527fdc80cf22926817e3992d7421.tar.zst
gsoc2013-empathy-e889f1ac2825527fdc80cf22926817e3992d7421.zip
tp-chat: add the 'member-renamed' signal
It uses to be implemented by the EmpathyContactList interface which has been removed. https://bugzilla.gnome.org/show_bug.cgi?id=674864
-rw-r--r--libempathy/empathy-tp-chat.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/libempathy/empathy-tp-chat.c b/libempathy/empathy-tp-chat.c
index 4daac8c53..29618cb5b 100644
--- a/libempathy/empathy-tp-chat.c
+++ b/libempathy/empathy-tp-chat.c
@@ -81,6 +81,7 @@ enum
SEND_ERROR,
CHAT_STATE_CHANGED,
MESSAGE_ACKNOWLEDGED,
+ SIG_MEMBER_RENAMED,
LAST_SIGNAL
};
@@ -959,9 +960,8 @@ tp_chat_got_renamed_contacts_cb (TpConnection *connection,
if (old != NULL)
{
- g_signal_emit_by_name (self, "member-renamed",
- old, new, rename_data->reason,
- rename_data->message);
+ g_signal_emit (self, signals[SIG_MEMBER_RENAMED], 0,
+ old, new, rename_data->reason, rename_data->message);
g_object_unref (old);
}
}
@@ -1281,6 +1281,14 @@ empathy_tp_chat_class_init (EmpathyTpChatClass *klass)
G_TYPE_NONE,
1, EMPATHY_TYPE_MESSAGE);
+ signals[SIG_MEMBER_RENAMED] = g_signal_new ("member-renamed",
+ G_OBJECT_CLASS_TYPE (klass),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL, NULL,
+ G_TYPE_NONE,
+ 4, EMPATHY_TYPE_CONTACT, EMPATHY_TYPE_CONTACT,
+ G_TYPE_UINT, G_TYPE_STRING);
+
g_type_class_add_private (object_class, sizeof (EmpathyTpChatPrivate));
}