summaryrefslogtreecommitdiff
path: root/libpurple/buddylist.c
diff options
context:
space:
mode:
authorFlorian Qu?ze <florian@instantbird.org>2016-05-15 17:59:23 -0300
committerFlorian Qu?ze <florian@instantbird.org>2016-05-15 17:59:23 -0300
commit6266b2b4dbe4de316250730611d727446fe88876 (patch)
treecb007e50b4ad6d3501498ef3e3e5393e3b64f259 /libpurple/buddylist.c
parent3724ca2ade151fac16d12933d614a5cf81bcb051 (diff)
downloadpidgin-6266b2b4dbe4de316250730611d727446fe88876.tar.gz
Add "buddy-removed-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)
Diffstat (limited to 'libpurple/buddylist.c')
-rw-r--r--libpurple/buddylist.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
index 09f0e33dcb..51da1cdf91 100644
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -994,8 +994,10 @@ void purple_blist_add_buddy(PurpleBuddy *buddy, PurpleContact *contact, PurpleGr
purple_counting_node_change_total_size(contact_counter, -1);
/* 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);
purple_serv_move_buddy(buddy, (PurpleGroup *)bnode->parent->parent, g);
+ }
if (bnode->next)
bnode->next->prev = bnode->prev;
@@ -1972,6 +1974,10 @@ purple_blist_init(void)
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_BLIST_NODE);
+ purple_signal_register(handle, "buddy-removed-from-group",
+ purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
+ PURPLE_TYPE_BUDDY);
+
purple_signal_register(handle, "buddy-icon-changed",
purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
PURPLE_TYPE_BUDDY);