/pidgin/main: 7ccc29fdaf4c: Merged in dequisdequis/pidgin (pull ...

Gary Kramlich grim at reaperworld.com
Wed May 25 12:11:18 EDT 2016


Changeset: 7ccc29fdaf4c152906a1c91622de26a0f95c57ae
Author:	 Gary Kramlich <grim at reaperworld.com>
Date:	 2016-05-25 11:10 -0500
Branch:	 default
URL: https://hg.pidgin.im/pidgin/main/rev/7ccc29fdaf4c

Description:

Merged in dequisdequis/pidgin (pull request #50)

Add a couple of signals from instantbird (3.x part)

diffstat:

 libpurple/accounts.c  |  5 +++++
 libpurple/buddylist.c |  8 +++++++-
 libpurple/protocols.c |  3 +++
 3 files changed, 15 insertions(+), 1 deletions(-)

diffs (54 lines):

diff --git a/libpurple/accounts.c b/libpurple/accounts.c
--- a/libpurple/accounts.c
+++ b/libpurple/accounts.c
@@ -929,6 +929,11 @@ purple_accounts_init(void)
 						 purple_marshal_VOID__POINTER, G_TYPE_NONE, 1,
 						 PURPLE_TYPE_ACCOUNT);
 
+	purple_signal_register(handle, "account-status-changing",
+						 purple_marshal_VOID__POINTER_POINTER_POINTER,
+						 G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
+						 PURPLE_TYPE_STATUS, PURPLE_TYPE_STATUS);
+
 	purple_signal_register(handle, "account-status-changed",
 						 purple_marshal_VOID__POINTER_POINTER_POINTER,
 						 G_TYPE_NONE, 3, PURPLE_TYPE_ACCOUNT,
diff --git a/libpurple/buddylist.c b/libpurple/buddylist.c
--- a/libpurple/buddylist.c
+++ b/libpurple/buddylist.c
@@ -994,8 +994,10 @@ void purple_blist_add_buddy(PurpleBuddy 
 		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);
diff --git a/libpurple/protocols.c b/libpurple/protocols.c
--- a/libpurple/protocols.c
+++ b/libpurple/protocols.c
@@ -454,6 +454,9 @@ purple_protocol_change_account_status(Pu
 	g_return_if_fail(new_status != NULL);
 	g_return_if_fail(!purple_status_is_exclusive(new_status) || old_status != NULL);
 
+	purple_signal_emit(purple_accounts_get_handle(), "account-status-changing",
+					account, old_status, new_status);
+
 	do_protocol_change_account_status(account, old_status, new_status);
 
 	purple_signal_emit(purple_accounts_get_handle(), "account-status-changed",



More information about the Commits mailing list