[polari] room: Add 'message' parameter to disconnect signal
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] room: Add 'message' parameter to disconnect signal
- Date: Thu, 8 Aug 2013 13:06:41 +0000 (UTC)
commit ac3f570a5bed6ce86bf2ef6023d3e991c8451138
Author: Florian Müllner <florian muellner gmail com>
Date: Mon Jul 22 16:06:23 2013 +0200
room: Add 'message' parameter to disconnect signal
tp-idle ignores message parameters to part/quit, but for the latter
it still puts in the (global) quit-message ...
src/chatView.js | 7 +++++--
src/lib/polari-room.c | 4 ++--
2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index c0909ce..c98dea8 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -175,8 +175,11 @@ const ChatView = new Lang.Class({
newMember.alias));
},
- _onMemberDisconnected: function(room, member) {
- this._insertStatus(_("%s has disconnected").format(member.alias));
+ _onMemberDisconnected: function(room, member, message) {
+ let text = _("%s has disconnected").format(member.alias);
+ if (message)
+ text += ' (%s)'.format(message);
+ this._insertStatus(text);
},
_onMemberKicked: function(room, member, actor) {
diff --git a/src/lib/polari-room.c b/src/lib/polari-room.c
index 0970e4e..7431794 100644
--- a/src/lib/polari-room.c
+++ b/src/lib/polari-room.c
@@ -219,7 +219,7 @@ on_group_contacts_changed (TpChannel *channel,
case TP_CHANNEL_GROUP_CHANGE_REASON_OFFLINE:
for (i = 0; i < removed->len; i++)
g_signal_emit (user_data, signals[MEMBER_DISCONNECTED], 0,
- g_ptr_array_index (removed, i));
+ g_ptr_array_index (removed, i), message);
break;
case TP_CHANNEL_GROUP_CHANGE_REASON_KICKED:
for (i = 0; i < removed->len; i++)
@@ -415,7 +415,7 @@ polari_room_class_init (PolariRoomClass *klass)
G_SIGNAL_RUN_LAST,
0,
NULL, NULL, NULL,
- G_TYPE_NONE, 1, TP_TYPE_CONTACT);
+ G_TYPE_NONE, 2, TP_TYPE_CONTACT, G_TYPE_STRING);
signals[MEMBER_RENAMED] =
g_signal_new ("member-renamed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]