/pidgin/main: 5e5e84e8a798: Add "buddy-remove-from-group" blist ...
Florian Qu?ze
florian at instantbird.org
Sun May 15 13:50:58 EDT 2016
Changeset: 5e5e84e8a79890e580158ac2eae073d7394e93b7
Author: Florian Qu?ze <florian at instantbird.org>
Date: 2016-05-15 05:41 -0300
Branch: release-2.x.y
URL: https://hg.pidgin.im/pidgin/main/rev/5e5e84e8a798
Description:
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)
diffstat:
ChangeLog.API | 1 +
libpurple/blist.c | 9 ++++++++-
2 files changed, 9 insertions(+), 1 deletions(-)
diffs (38 lines):
diff --git a/ChangeLog.API b/ChangeLog.API
--- a/ChangeLog.API
+++ b/ChangeLog.API
@@ -4,6 +4,7 @@ version 2.11.0:
libpurple:
Added:
* account-status-changing signal (account signals)
+ * buddy-removed-from-group signal (blist signals)
version 2.10.12:
* No changes
diff --git a/libpurple/blist.c b/libpurple/blist.c
--- a/libpurple/blist.c
+++ b/libpurple/blist.c
@@ -1624,8 +1624,10 @@ void purple_blist_add_buddy(PurpleBuddy
((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_blist_init(void)
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,
More information about the Commits
mailing list