Add "buddy-remove-from-group" blist signal from instantbird release-2.x.y

Sun, 15 May 2016 05:41:39 -0300

author
Florian Quèze <florian@instantbird.org>
date
Sun, 15 May 2016 05:41:39 -0300
branch
release-2.x.y
changeset 37672
5e5e84e8a798
parent 37671
84837bf0a2c8
child 37684
96bd4f28be12
child 37685
ef161f30f8bc
child 37691
ae26e3eace57
child 37802
e6159ad42c4c
child 37804
abdc3025f6b8
child 37806
1c4acc6977a8
child 37808
5fa3f2bc69d7
child 37810
19f89eda8587
child 37812
8172584fd640
child 37814
f6c08d962618
child 37816
7b52ca213832
child 37818
f0287378203f
child 37820
b786e9814536
child 37822
06278419c703
child 37828
60f95045db42
child 37831
0f94ef13ab37
child 37837
d6fc1ce76ffe
child 37859
1448543681b6
child 37861
183e39dc4190
child 37863
6143bf4f9cc0
child 37865
b8f8bf6d813f
child 37868
03437cc299d4
child 37870
a9c65ec9aaf2
child 37874
660e41d31deb
child 37877
a21b7b6aae4f

Add "buddy-remove-from-group" blist signal from instantbird

It is fired when a buddy is removed permanently from a group but
not from the buddy list. (ie when the buddy has been moved)

ChangeLog.API file | annotate | diff | comparison | revisions
libpurple/blist.c file | annotate | diff | comparison | revisions
--- a/ChangeLog.API	Sun May 15 05:28:07 2016 -0300
+++ b/ChangeLog.API	Sun May 15 05:41:39 2016 -0300
@@ -4,6 +4,7 @@
 	libpurple:
 		Added:
 		* account-status-changing signal (account signals)
+		* buddy-removed-from-group signal (blist signals)
 
 version 2.10.12:
 	* No changes
--- a/libpurple/blist.c	Sun May 15 05:28:07 2016 -0300
+++ b/libpurple/blist.c	Sun May 15 05:41:39 2016 -0300
@@ -1624,8 +1624,10 @@
 		((PurpleContact*)bnode->parent)->totalsize--;
 		/* the group totalsize will be taken care of by remove_contact below */
 
-		if (bnode->parent->parent != (PurpleBlistNode*)g)
+		if (bnode->parent->parent != (PurpleBlistNode*)g) {
+			purple_signal_emit(purple_blist_get_handle(), "buddy-removed-from-group", buddy);
 			serv_move_buddy(buddy, (PurpleGroup *)bnode->parent->parent, g);
+		}
 
 		if (bnode->next)
 			bnode->next->prev = bnode->prev;
@@ -3193,6 +3195,11 @@
 						 purple_value_new(PURPLE_TYPE_SUBTYPE,
 										PURPLE_SUBTYPE_BLIST_BUDDY));
 
+	purple_signal_register(handle, "buddy-removed-from-group",
+						 purple_marshal_VOID__POINTER, NULL, 1,
+						 purple_value_new(PURPLE_TYPE_SUBTYPE,
+										PURPLE_SUBTYPE_BLIST_BUDDY));
+
 	purple_signal_register(handle, "buddy-icon-changed",
 						 purple_marshal_VOID__POINTER, NULL, 1,
 						 purple_value_new(PURPLE_TYPE_SUBTYPE,

mercurial