[polari] room: Add ::members-changed signal
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari] room: Add ::members-changed signal
- Date: Fri, 11 Oct 2013 17:36:15 +0000 (UTC)
commit ef46f01f0ca5269df257cc2db5efd85396da93e5
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Oct 9 11:56:11 2013 +0200
room: Add ::members-changed signal
Sometimes it's enough to know that the list of users has changed
without being interested in the actual details of the change.
Having to track six separate signals is inconvenient in that case,
so add a generic ::members-changed signal.
src/lib/polari-room.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/src/lib/polari-room.c b/src/lib/polari-room.c
index ae050f9..38fbe55 100644
--- a/src/lib/polari-room.c
+++ b/src/lib/polari-room.c
@@ -58,6 +58,8 @@ enum
MEMBER_KICKED,
MEMBER_BANNED,
+ MEMBERS_CHANGED,
+
LAST_SIGNAL
};
@@ -281,6 +283,8 @@ on_group_contacts_changed (TpChannel *channel,
g_ptr_array_index (added, i));
break;
}
+
+ g_signal_emit (user_data, signals[MEMBERS_CHANGED], 0);
}
static void
@@ -549,6 +553,14 @@ polari_room_class_init (PolariRoomClass *klass)
0,
NULL, NULL, NULL,
G_TYPE_NONE, 2, TP_TYPE_CONTACT, TP_TYPE_CONTACT);
+
+ signals[MEMBERS_CHANGED] =
+ g_signal_new ("members-changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0,
+ NULL, NULL, NULL,
+ G_TYPE_NONE, 0);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]