diff options
author | <robert.mcqueen@collabora.co.uk> | 2006-06-15 17:33:14 +0000 |
---|---|---|
committer | <robert.mcqueen@collabora.co.uk> | 2006-06-15 17:33:14 +0000 |
commit | 950d42cdd65c9c2b6a703b9e9a894bdaf26ebf0d (patch) | |
tree | 270a6c9e92590745e9521412185ef92ab09a92aa | |
parent | 4bb5392815b6c9312a68df638c116c97bde8f94e (diff) |
make gabble_group_mixin_change_members emit a boolean indicating whether anything has changed
-rw-r--r-- | src/group-mixin.c | 9 | ||||
-rw-r--r-- | src/group-mixin.h | 2 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/group-mixin.c b/src/group-mixin.c index dd165f5d8..b58c1a994 100644 --- a/src/group-mixin.c +++ b/src/group-mixin.c @@ -520,7 +520,7 @@ static void remove_handle_owners_if_exist (GObject *obj, GArray *array); * Request members to be added, removed or marked as local or remote pending. * Changes member sets, references, and emits the MembersChanged signal. */ -void +gboolean gabble_group_mixin_change_members (GObject *obj, const gchar *message, GIntSet *add, @@ -532,6 +532,7 @@ gabble_group_mixin_change_members (GObject *obj, GabbleGroupMixinClass *mixin_cls = GABBLE_GROUP_MIXIN_CLASS (G_OBJECT_GET_CLASS (obj)); GIntSet *new_add, *new_remove, *new_local_pending, *new_remote_pending, *tmp, *tmp2; + gboolean ret; g_assert (add != NULL); g_assert (remove != NULL); @@ -641,10 +642,14 @@ gabble_group_mixin_change_members (GObject *obj, g_array_free (arr_remove, TRUE); g_array_free (arr_local, TRUE); g_array_free (arr_remote, TRUE); + + ret = TRUE; } else { g_debug ("%s: not emitting signal, nothing changed", G_STRFUNC); + + ret = FALSE; } /* free intsets */ @@ -652,6 +657,8 @@ gabble_group_mixin_change_members (GObject *obj, g_intset_destroy (new_remove); g_intset_destroy (new_local_pending); g_intset_destroy (new_remote_pending); + + return ret; } void diff --git a/src/group-mixin.h b/src/group-mixin.h index 4a7c6d415..19d7592ae 100644 --- a/src/group-mixin.h +++ b/src/group-mixin.h @@ -87,7 +87,7 @@ gboolean gabble_group_mixin_get_all_members (GObject *obj, GArray **ret, GArray gboolean gabble_group_mixin_get_handle_owners (GObject *obj, const GArray *handles, GArray **ret, GError **error); void gabble_group_mixin_change_flags (GObject *obj, TpChannelGroupFlags add, TpChannelGroupFlags remove); -void gabble_group_mixin_change_members (GObject *obj, const gchar *message, GIntSet *add, GIntSet *remove, GIntSet *local_pending, GIntSet *remote_pending); +gboolean gabble_group_mixin_change_members (GObject *obj, const gchar *message, GIntSet *add, GIntSet *remove, GIntSet *local_pending, GIntSet *remote_pending); void gabble_group_mixin_add_handle_owner (GObject *obj, GabbleHandle local_handle, GabbleHandle owner_handle); |