/soc/2013/ankitkv/gobjectification: 92c196849837: Emit gsignals ...

Ankit Vani a at nevitus.org
Thu Oct 10 14:24:12 EDT 2013


Changeset: 92c19684983786f897df3ff48c68ad98c6009648
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-10-10 23:53 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/92c196849837

Description:

Emit gsignals in libpurple for accounts

diffstat:

 libpurple/connection.c |  4 +++-
 libpurple/protocols.c  |  8 ++++----
 libpurple/server.c     |  7 +++----
 3 files changed, 10 insertions(+), 9 deletions(-)

diffs (59 lines):

diff --git a/libpurple/connection.c b/libpurple/connection.c
--- a/libpurple/connection.c
+++ b/libpurple/connection.c
@@ -908,7 +908,9 @@ void
 	{
 		purple_debug_info("connection", "Connecting. gc = %p\n", gc);
 
-		purple_signal_emit(purple_accounts_get_handle(), "account-connecting", account);
+		g_signal_emit_by_name(purple_account_manager_get_instance(),
+				"account-connecting", account);
+
 		purple_protocol_class_login(protocol, account);
 	}
 }
diff --git a/libpurple/protocols.c b/libpurple/protocols.c
--- a/libpurple/protocols.c
+++ b/libpurple/protocols.c
@@ -264,8 +264,8 @@ purple_protocol_got_account_actions(Purp
 	g_return_if_fail(account != NULL);
 	g_return_if_fail(purple_account_is_connected(account));
 
-	purple_signal_emit(purple_accounts_get_handle(), "account-actions-changed",
-	                   account);
+	g_signal_emit_by_name(purple_account_manager_get_instance(),
+	                      "account-actions-changed", account);
 }
 
 void
@@ -456,8 +456,8 @@ purple_protocol_change_account_status(Pu
 
 	do_protocol_change_account_status(account, old_status, new_status);
 
-	purple_signal_emit(purple_accounts_get_handle(), "account-status-changed",
-					account, old_status, new_status);
+	g_signal_emit_by_name(purple_account_manager_get_instance(),
+					"account-status-changed", account, old_status, new_status);
 }
 
 GList *
diff --git a/libpurple/server.c b/libpurple/server.c
--- a/libpurple/server.c
+++ b/libpurple/server.c
@@ -178,13 +178,12 @@ void serv_set_info(PurpleConnection *gc,
 		if (PURPLE_PROTOCOL_IMPLEMENTS(protocol, SERVER_IFACE, set_info)) {
 			account = purple_connection_get_account(gc);
 
-			if (purple_signal_emit_return_1(purple_accounts_get_handle(),
-					"account-setting-info", account, info))
-				return;
+			g_signal_emit_by_name(purple_account_manager_get_instance(),
+					"account-setting-info", account, info);
 
 			purple_protocol_server_iface_set_info(protocol, gc, info);
 
-			purple_signal_emit(purple_accounts_get_handle(),
+			g_signal_emit_by_name(purple_account_manager_get_instance(),
 					"account-set-info", account, info);
 		}
 	}



More information about the Commits mailing list