From 72bb1b98e066c79dea8c58955c58cb45b26db632 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 27 Oct 2011 12:03:19 +0200 Subject: [PATCH] group-mixin: always set the Members_Changed_Detailed flag We unconditionally implements the MembersChangedDetailed signal so this flag should always be set. https://bugs.freedesktop.org/show_bug.cgi?id=42305 --- telepathy-glib/group-mixin.c | 2 +- tests/lib/textchan-group.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/telepathy-glib/group-mixin.c b/telepathy-glib/group-mixin.c index 959fb4a..5bf68fd 100644 --- a/telepathy-glib/group-mixin.c +++ b/telepathy-glib/group-mixin.c @@ -334,7 +334,7 @@ tp_group_mixin_init (GObject *obj, if (self_handle != 0) mixin->self_handle = tp_handle_ref (handle_repo, self_handle); - mixin->group_flags = 0; + mixin->group_flags = TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED; mixin->members = tp_handle_set_new (handle_repo); mixin->local_pending = tp_handle_set_new (handle_repo); diff --git a/tests/lib/textchan-group.c b/tests/lib/textchan-group.c index c443257..618b8ca 100644 --- a/tests/lib/textchan-group.c +++ b/tests/lib/textchan-group.c @@ -143,9 +143,6 @@ constructor (GType type, TP_CHANNEL_TEXT_MESSAGE_TYPE_NOTICE, G_MAXUINT); - if (self->priv->detailed) - flags |= TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED; - if (self->priv->properties) flags |= TP_CHANNEL_GROUP_FLAG_PROPERTIES; @@ -153,6 +150,16 @@ constructor (GType type, tp_group_mixin_init (object, G_STRUCT_OFFSET (TpTestsTextChannelGroup, group), contact_repo, self->conn->self_handle); + + if (!self->priv->detailed) + { + /* TpGroupMixin always set the Members_Changed_Detailed flag so we have + * to cheat and manually remove it to pretend we don't implement it. */ + TpGroupMixin *group = TP_GROUP_MIXIN (self); + + group->group_flags &= ~TP_CHANNEL_GROUP_FLAG_MEMBERS_CHANGED_DETAILED; + } + tp_group_mixin_change_flags (object, flags, 0); return object; -- 1.7.4.1