gobjectification: 30b7bd00: Use purple_g_signal_connect(PURPLE_TYPE_...

qulogic at pidgin.im qulogic at pidgin.im
Tue Jul 20 01:16:17 EDT 2010


----------------------------------------------------------------------
Revision: 30b7bd009e86cc798927aef0729ef18e9166a96c
Parent:   44b4b1ca527e1f7637cfe25992d0d0d2ccedd5e5
Author:   qulogic at pidgin.im
Date:     07/20/10 00:26:53
Branch:   im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/30b7bd009e86cc798927aef0729ef18e9166a96c

Changelog: 

Use purple_g_signal_connect(PURPLE_TYPE_CONNECTION,... where needed.
Probably leaky and a bit crashy since we don't remove them yet.

Changes against parent 44b4b1ca527e1f7637cfe25992d0d0d2ccedd5e5

  patched  finch/gntblist.c
  patched  finch/gntconv.c
  patched  finch/gntpounce.c
  patched  finch/gntsound.c
  patched  libpurple/blist.c
  patched  libpurple/example/nullclient.c
  patched  libpurple/idle.c
  patched  libpurple/plugins/idle.c
  patched  libpurple/plugins/signals-test.c
  patched  pidgin/gtkaccount.c
  patched  pidgin/gtkblist.c
  patched  pidgin/gtkconv.c
  patched  pidgin/gtkdocklet.c
  patched  pidgin/gtknotify.c
  patched  pidgin/gtkpounce.c
  patched  pidgin/gtksound.c
  patched  pidgin/gtkutils.c
  patched  pidgin/plugins/cap/cap.c
  patched  pidgin/plugins/gevolution/gevolution.c
  patched  pidgin/plugins/mailchk.c
  patched  pidgin/plugins/pidgininc.c
  patched  pidgin/plugins/relnot.c
  patched  pidgin/plugins/ticker/ticker.c
  patched  pidgin/plugins/xmppconsole.c

-------------- next part --------------
============================================================
--- pidgin/plugins/pidgininc.c	eefba5e0878fae442430bc414ac11eea158c81fc
+++ pidgin/plugins/pidgininc.c	17c6402a53c21b54cd94a56f6ecdf764c473c301
@@ -62,8 +62,8 @@ plugin_load(PurplePlugin *plugin)
 plugin_load(PurplePlugin *plugin)
 {
 	/* this is for doing something fun when we sign on */
-	purple_signal_connect(NULL, "signed-on",
-						plugin, PURPLE_CALLBACK(echo_hi), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(echo_hi), NULL);
 
 	/* this is for doing something fun when we get a message */
 	purple_signal_connect(purple_conversations_get_handle(), "receiving-im-msg",
============================================================
--- pidgin/plugins/mailchk.c	8b1e0a6e56eac726805edddd41023af02fe06dba
+++ pidgin/plugins/mailchk.c	1c9a39d2694355a63e1d5c11fe89c25ef43160e9
@@ -115,7 +115,6 @@ plugin_load(PurplePlugin *plugin)
 plugin_load(PurplePlugin *plugin)
 {
 	PurpleBuddyList *list = purple_get_blist();
-	void *conn_handle = NULL;
 
 	if (!check_timeout(NULL)) {
 		purple_debug_warning("mailchk", "Could not read $MAIL or /var/spool/mail/$USER\n");
@@ -125,10 +124,10 @@ plugin_load(PurplePlugin *plugin)
 	if (list && PURPLE_IS_GTK_BLIST(list) && PIDGIN_BLIST(list)->vbox)
 		timer = purple_timeout_add_seconds(2, check_timeout, NULL);
 
-	purple_signal_connect(conn_handle, "signed-on",
-						plugin, PURPLE_CALLBACK(signon_cb), NULL);
-	purple_signal_connect(conn_handle, "signed-off",
-						plugin, PURPLE_CALLBACK(signoff_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(signon_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+						PURPLE_CALLBACK(signoff_cb), NULL);
 
 	return TRUE;
 }
============================================================
--- pidgin/plugins/ticker/ticker.c	90668a3dd703782d78de3f48dd4f732784c8033b
+++ pidgin/plugins/ticker/ticker.c	bbcfdd6bfe1412c37a9c73feb855a10c7b01462d
@@ -30,6 +30,7 @@
 #include "blist.h"
 #include "conversation.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "prpl.h"
 #include "signals.h"
 #include "version.h"
@@ -321,8 +322,8 @@ plugin_load(PurplePlugin *plugin)
 {
 	void *blist_handle = purple_blist_get_handle();
 
-	purple_signal_connect(NULL, "signed-off",
-						plugin, PURPLE_CALLBACK(signoff_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+						PURPLE_CALLBACK(signoff_cb), NULL);
 	purple_signal_connect(blist_handle, "buddy-signed-on",
 						plugin, PURPLE_CALLBACK(buddy_signon_cb), NULL);
 	purple_signal_connect(blist_handle, "buddy-signed-off",
============================================================
--- libpurple/plugins/idle.c	662cac9a9f2e99254fbf77b93ee171df34c09ad9
+++ libpurple/plugins/idle.c	010d70d25e0564aaa3eda4490acad275fb549684
@@ -27,6 +27,7 @@
 #include "accountlist.h"
 #include "connection.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "notify.h"
 #include "plugin.h"
 #include "request.h"
@@ -287,8 +288,7 @@ plugin_load(PurplePlugin *plugin)
 static gboolean
 plugin_load(PurplePlugin *plugin)
 {
-	purple_signal_connect(NULL, "signing-off",
-						plugin,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-off",
 						PURPLE_CALLBACK(signing_off_cb), NULL);
 
 	return TRUE;
============================================================
--- pidgin/gtkconv.c	96a4630badf39ce20a4296fdfbe5e906af7ea152
+++ pidgin/gtkconv.c	24aab820c3ac1c10c6ff6f5014351c9d9f9485cd
@@ -46,6 +46,7 @@
 #include "cmds.h"
 #include "core.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "idle.h"
 #include "imgstore.h"
 #include "log.h"
@@ -8156,13 +8157,13 @@ pidgin_conversations_init(void)
 	 * UI operations
 	 **********************************************************************/
 
-	purple_signal_connect(NULL, "signed-on", handle,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 						G_CALLBACK(account_signed_off_cb),
 						GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_ONLINE));
-	purple_signal_connect(NULL, "signed-off", handle,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 						G_CALLBACK(account_signed_off_cb),
 						GINT_TO_POINTER(PURPLE_CONV_ACCOUNT_OFFLINE));
-	purple_signal_connect(NULL, "signing-off", handle,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-off",
 						G_CALLBACK(account_signing_off), NULL);
 
 	purple_signal_connect(purple_conversations_get_handle(), "received-im-msg",
============================================================
--- pidgin/gtkutils.c	b09b0403c9ad8a7dfeb8da475131946722eb38b4
+++ pidgin/gtkutils.c	9026b80a748910f6af96dbbaf2d957b4471d65f0
@@ -894,11 +894,11 @@ pidgin_account_option_menu_new(PurpleAcc
 					 G_CALLBACK(account_menu_destroyed_cb), NULL);
 
 	/* Register the purple sign on/off event callbacks. */
-	purple_signal_connect(NULL, "signed-on",
-						optmenu, PURPLE_CALLBACK(account_menu_sign_on_off_cb),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(account_menu_sign_on_off_cb),
 						optmenu);
-	purple_signal_connect(NULL, "signed-off",
-						optmenu, PURPLE_CALLBACK(account_menu_sign_on_off_cb),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+						PURPLE_CALLBACK(account_menu_sign_on_off_cb),
 						optmenu);
 #if 0
 	purple_signal_connect(purple_accounts_get_handle(), "account-added",
============================================================
--- pidgin/gtkpounce.c	9656cb05ff6844f92164e46b63d9df4f9215326c
+++ pidgin/gtkpounce.c	9144752904b3e5c3023e53da3847883495401ced
@@ -30,6 +30,7 @@
 #include "accountlist.h"
 #include "conversation.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "prpl.h"
 #include "request.h"
 #include "server.h"
@@ -1365,10 +1366,10 @@ pidgin_pounces_manager_show(void)
 	button = pidgin_dialog_add_button(GTK_DIALOG(win), PIDGIN_STOCK_ADD, G_CALLBACK(pounces_manager_add_cb), dialog);
 	gtk_widget_set_sensitive(button, (purple_accounts_all() != NULL));
 
-	purple_signal_connect(NULL, "signed-on",
-						pounces_manager, PURPLE_CALLBACK(pounces_manager_connection_cb), button);
-	purple_signal_connect(NULL, "signed-off",
-						pounces_manager, PURPLE_CALLBACK(pounces_manager_connection_cb), button);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(pounces_manager_connection_cb), button);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+						PURPLE_CALLBACK(pounces_manager_connection_cb), button);
 
 	/* Modify button */
 	button = pidgin_dialog_add_button(GTK_DIALOG(win), PIDGIN_STOCK_MODIFY, G_CALLBACK(pounces_manager_modify_cb), dialog);
@@ -1600,10 +1601,8 @@ pidgin_pounces_init(void)
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/pounces/dialog/width",  520);
 	purple_prefs_add_int(PIDGIN_PREFS_ROOT "/pounces/dialog/height", 321);
 
-	purple_signal_connect(NULL, "signed-on",
-						pidgin_pounces_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 						PURPLE_CALLBACK(signed_on_off_cb), NULL);
-	purple_signal_connect(NULL, "signed-off",
-						pidgin_pounces_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 						PURPLE_CALLBACK(signed_on_off_cb), NULL);
 }
============================================================
--- libpurple/blist.c	7909e99778f02790409f8bd400bf3ed6e85339a2
+++ libpurple/blist.c	84e4ff5e29d37803b397215c4652c3e9a56694ed
@@ -1538,11 +1538,14 @@ purple_blist_instance_init(GTypeInstance
 	gbl->groups_cache = g_hash_table_new_full(g_str_hash, g_str_equal,
 					 (GDestroyNotify)g_free, NULL);
 
+/* TODO: This signal is commented out in blist-node.c */
+#if 0
 	purple_signal_connect(purple_blist_node_get_handle(), "node-renamed", /* What to connect to */
 		instance, /* Object receiving the signal */
 		PURPLE_CALLBACK(purple_blist_node_renamed), /* Callback function */
 		instance /* Data to pass to the callback function */
 	);
+#endif
 
 	gbl->save_timer = 0;
 	gbl->blist_loaded = FALSE;
============================================================
--- pidgin/gtkblist.c	cf6c26c868ab30f73bfa46b3efd26d0a558baffd
+++ pidgin/gtkblist.c	bb0e44ef252c3832a1e4c74214ce98dfc694be04
@@ -6133,10 +6133,9 @@ static void pidgin_blist_show(void)
 	purple_signal_connect(handle, "account-modified", gtkblist,
 	                      PURPLE_CALLBACK(account_modified), gtkblist);
 
-	handle = NULL;
-	purple_signal_connect(handle, "signed-on", gtkblist,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 	                      PURPLE_CALLBACK(sign_on_off_cb), NULL);
-	purple_signal_connect(handle, "signed-off", gtkblist,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 	                      PURPLE_CALLBACK(sign_on_off_cb), NULL);
 
 	handle = purple_plugins_get_handle();
@@ -7603,9 +7602,11 @@ void pidgin_blist_init(void)
 	purple_signal_connect(purple_blist_get_handle(), "buddy-privacy-changed",
 			gtk_blist_handle, PURPLE_CALLBACK(pidgin_blist_update_privacy_cb), NULL);
 
-	purple_signal_connect_priority(NULL, "autojoin",
-	                               gtk_blist_handle, PURPLE_CALLBACK(autojoin_cb),
+#if 0
+	purple_g_signal_connect_priority(PURPLE_TYPE_CONNECTION, "autojoin",
+	                               PURPLE_CALLBACK(autojoin_cb),
 	                               NULL, PURPLE_SIGNAL_PRIORITY_HIGHEST);
+#endif
 }
 
 void
============================================================
--- pidgin/gtknotify.c	765b55254fc2e3b0096c1ed57179dc738108fbfb
+++ pidgin/gtknotify.c	b3b3eb5bf0f7db45d3cfb32789bb887fc35e49f0
@@ -31,6 +31,7 @@
 #include "account.h"
 #include "connection.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "prefs.h"
 #include "pidginstock.h"
 #include "util.h"
@@ -1656,10 +1657,8 @@ void pidgin_notify_init(void)
 
 void pidgin_notify_init(void)
 {
-	void *handle = pidgin_notify_get_handle();
-
-	purple_signal_connect(NULL, "signed-off",
-			handle, PURPLE_CALLBACK(signed_off_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+			PURPLE_CALLBACK(signed_off_cb), NULL);
 }
 
 void pidgin_notify_uninit(void)
============================================================
--- pidgin/gtkaccount.c	6ee32727ed71656cf8f577beb29cbe79122c4529
+++ pidgin/gtkaccount.c	6490f4300c38237a40106f9deb7618c939c79833
@@ -615,9 +615,9 @@ add_login_options(AccountPrefsDialog *di
 
 	/* Do not let the user change the protocol/username while connected. */
 	update_editable(NULL, dialog);
-	purple_signal_connect(NULL, "signing-on", dialog,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-on",
 					G_CALLBACK(update_editable), dialog);
-	purple_signal_connect(NULL, "signed-off", dialog,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 					G_CALLBACK(update_editable), dialog);
 }
 
@@ -2576,11 +2576,9 @@ pidgin_account_init(void)
 										PURPLE_SUBTYPE_ACCOUNT));
 
 	/* Setup some purple signal handlers. */
-	purple_signal_connect(NULL, "signed-on",
-						pidgin_account_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 						PURPLE_CALLBACK(signed_on_off_cb), NULL);
-	purple_signal_connect(NULL, "signed-off",
-						pidgin_account_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 						PURPLE_CALLBACK(signed_on_off_cb), NULL);
 #if 0
 	purple_signal_connect(purple_accounts_get_handle(), "account-added",
============================================================
--- pidgin/gtksound.c	323b4e2c0eef330c314c827c9d52f84f206ebb76
+++ pidgin/gtksound.c	6206c4fac07b68346eca980e96b276fa2db327d7
@@ -37,6 +37,7 @@
 #endif /* USE_GSTREAMER */
 
 #include "debug.h"
+#include "gsignal.h"
 #include "notify.h"
 #include "prefs.h"
 #include "sound.h"
@@ -281,8 +282,8 @@ pidgin_sound_init(void)
 	GError *error = NULL;
 #endif
 
-	purple_signal_connect(NULL, "signed-on",
-						gtk_sound_handle, PURPLE_CALLBACK(account_signon_cb),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(account_signon_cb),
 						NULL);
 
 	purple_prefs_add_none(PIDGIN_PREFS_ROOT "/sound");
============================================================
--- libpurple/plugins/signals-test.c	358f5310356465fefe7a3c14dbd9b193e7728cb6
+++ libpurple/plugins/signals-test.c	699b6e37446f2876e6ddf3012c4081b93b901b2b
@@ -29,6 +29,7 @@
 #include "core.h"
 #include "debug.h"
 #include "ft.h"
+#include "gsignal.h"
 #include "signals.h"
 #include "version.h"
 #include "status.h"
@@ -728,19 +729,17 @@ plugin_load(PurplePlugin *plugin)
 	purple_signal_connect(blist_handle, "blist-node-extended-menu",
 						plugin, PURPLE_CALLBACK(blist_node_extended_menu_cb), NULL);
 
-#if 0
 	/* Connection subsystem signals */
-	purple_signal_connect(conn_handle, "signing-on",
-						plugin, PURPLE_CALLBACK(signing_on_cb), NULL);
-	purple_signal_connect(conn_handle, "signed-on",
-						plugin, PURPLE_CALLBACK(signed_on_cb), NULL);
-	purple_signal_connect(conn_handle, "signing-off",
-						plugin, PURPLE_CALLBACK(signing_off_cb), NULL);
-	purple_signal_connect(conn_handle, "signed-off",
-						plugin, PURPLE_CALLBACK(signed_off_cb), NULL);
-	purple_signal_connect(conn_handle, "connection-error",
-						plugin, PURPLE_CALLBACK(connection_error_cb), NULL);
-#endif
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-on",
+						PURPLE_CALLBACK(signing_on_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(signed_on_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-off",
+						PURPLE_CALLBACK(signing_off_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+						PURPLE_CALLBACK(signed_off_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "connection-error",
+						PURPLE_CALLBACK(connection_error_cb), NULL);
 
 	/* Conversations subsystem signals */
 	purple_signal_connect(conv_handle, "writing-im-msg",
============================================================
--- pidgin/plugins/relnot.c	e14364c66c842415e654ec3a592837bdee3dded5
+++ pidgin/plugins/relnot.c	625ffe8549a444ebde6c1005a6dc0f855fb2da13
@@ -34,6 +34,7 @@
 #include "connection.h"
 #include "core.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "gtkblist.h"
 #include "gtkutils.h"
 #include "notify.h"
@@ -174,8 +175,8 @@ plugin_load(PurplePlugin *plugin)
 static gboolean
 plugin_load(PurplePlugin *plugin)
 {
-	purple_signal_connect(NULL, "signed-on",
-						plugin, PURPLE_CALLBACK(signed_on_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(signed_on_cb), NULL);
 
 	/* we don't check if we're offline */
 	if(purple_connections_get_all())
============================================================
--- libpurple/idle.c	5513c3edb436c3f19391cb0ed9b145188d67a1b5
+++ libpurple/idle.c	884bc1f2a99f496f546fcc0e43ea229ffc1d09cf
@@ -25,6 +25,7 @@
 #include "connection.h"
 #include "debug.h"
 #include "eventloop.h"
+#include "gsignal.h"
 #include "idle.h"
 #include "log.h"
 #include "prefs.h"
@@ -321,11 +322,9 @@ purple_idle_init()
 	purple_signal_connect(purple_conversations_get_handle(), "sent-im-msg",
 						purple_idle_get_handle(),
 						PURPLE_CALLBACK(im_msg_sent_cb), NULL);
-	purple_signal_connect(NULL, "signing-on",
-						purple_idle_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-on",
 						PURPLE_CALLBACK(signing_on_cb), NULL);
-	purple_signal_connect(NULL, "signing-off",
-						purple_idle_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-off",
 						PURPLE_CALLBACK(signing_off_cb), NULL);
 
 	purple_prefs_connect_callback(purple_idle_get_handle(), "/purple/away/idle_reporting",
============================================================
--- finch/gntblist.c	9d3067460974fdbe7b45402f762a4d0ed2227caf
+++ finch/gntblist.c	3a2b38ede7d16342da6f5be1eccab95a52e7a204
@@ -3117,7 +3117,7 @@ blist_show(void)
 
 	gnt_widget_show(ggblist->window);
 
-	purple_signal_connect(NULL, "signed-on", finch_blist_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 				PURPLE_CALLBACK(reconstruct_accounts_menu), NULL);
 	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 				PURPLE_CALLBACK(reconstruct_accounts_menu), NULL);
============================================================
--- finch/gntconv.c	22fb7cb7059e5732681c54e42afe688a00dc99ab
+++ finch/gntconv.c	15f20246446d5e45c86b1a484dbd456595bbe60b
@@ -29,6 +29,7 @@
 
 #include <cmds.h>
 #include <core.h>
+#include <gsignal.h>
 #include <idle.h>
 #include <prefs.h>
 #include <util.h>
@@ -1468,11 +1469,11 @@ void finch_conversation_init()
 					PURPLE_CALLBACK(buddy_signed_on_off), NULL);
 	purple_signal_connect(purple_blist_get_handle(), "buddy-signed-off", finch_conv_get_handle(),
 					PURPLE_CALLBACK(buddy_signed_on_off), NULL);
-	purple_signal_connect(NULL, "signed-on", finch_conv_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 					PURPLE_CALLBACK(account_signed_on_off), NULL);
-	purple_signal_connect(NULL, "signed-off", finch_conv_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 					PURPLE_CALLBACK(account_signed_on_off), NULL);
-	purple_signal_connect(NULL, "signing-off", finch_conv_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-off",
 					PURPLE_CALLBACK(account_signing_off), NULL);
 }
 
============================================================
--- pidgin/plugins/cap/cap.c	f24c4564bdf9edd093ccab56b36c5d2a53c2965a
+++ pidgin/plugins/cap/cap.c	e58ded9cbaab163404151cbfe252a781421fd7de
@@ -688,10 +688,10 @@ static void add_plugin_functionality(Pur
 	purple_signal_connect(pidgin_blist_get_handle(), "drawing-tooltip", plugin,
 			PURPLE_CALLBACK(drawing_tooltip), NULL);
 
-	purple_signal_connect(NULL, "signed-on", plugin,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 			PURPLE_CALLBACK(signed_on), NULL);
 	
-	purple_signal_connect(NULL, "signed-off", plugin,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 			PURPLE_CALLBACK(signed_off), NULL);
 
 	_signals_connected = TRUE;
============================================================
--- pidgin/gtkdocklet.c	9e68e0f474d67566af4a55b8ca7ed73746d7ab43
+++ pidgin/gtkdocklet.c	910676769dd000e9d7d5c36dce16cabca5153607
@@ -28,6 +28,7 @@
 #include "core.h"
 #include "conversation.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "prefs.h"
 #include "signals.h"
 #include "sound.h"
@@ -834,7 +835,6 @@ pidgin_docklet_init()
 void
 pidgin_docklet_init()
 {
-	void *conn_handle = NULL;
 	void *conv_handle = purple_conversations_get_handle();
 	void *accounts_handle = purple_accounts_get_handle();
 	void *status_handle = purple_savedstatuses_get_handle();
@@ -850,10 +850,11 @@ pidgin_docklet_init()
 	if (!strcmp(purple_prefs_get_string(PIDGIN_PREFS_ROOT "/docklet/show"), "always") && ui_ops && ui_ops->create)
 		ui_ops->create();
 
-	purple_signal_connect(conn_handle, "signed-on",
-			    docklet_handle, PURPLE_CALLBACK(docklet_signed_on_cb), NULL);
-	purple_signal_connect(conn_handle, "signed-off",
-			    docklet_handle, PURPLE_CALLBACK(docklet_signed_off_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+			    PURPLE_CALLBACK(docklet_signed_on_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+			    PURPLE_CALLBACK(docklet_signed_off_cb), NULL);
+
 	purple_signal_connect(accounts_handle, "account-connecting",
 			    docklet_handle, PURPLE_CALLBACK(docklet_update_status_cb), NULL);
 	purple_signal_connect(conv_handle, "received-im-msg",
============================================================
--- pidgin/plugins/xmppconsole.c	f6ace9ce7615e3575058bac6e52dfbd0cd7f10cd
+++ pidgin/plugins/xmppconsole.c	dc0f003b3e83780e4b83f3c803aab3329706bb35
@@ -21,6 +21,7 @@
 
 #include "internal.h"
 #include "accountlist.h"
+#include "gsignal.h"
 #include "gtkplugin.h"
 #include "version.h"
 #include "prpl.h"
@@ -700,10 +701,10 @@ plugin_load(PurplePlugin *plugin)
 			    PURPLE_CALLBACK(xmlnode_received_cb), NULL);
 	purple_signal_connect(jabber, "jabber-sending-text", xmpp_console_handle,
 			    PURPLE_CALLBACK(xmlnode_sent_cb), NULL);
-	purple_signal_connect(NULL, "signing-on",
-			    plugin, PURPLE_CALLBACK(signing_on_cb), NULL);
-	purple_signal_connect(NULL, "signed-off",
-			    plugin, PURPLE_CALLBACK(signed_off_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signing-on",
+			    PURPLE_CALLBACK(signing_on_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
+			    PURPLE_CALLBACK(signed_off_cb), NULL);
 
 	return TRUE;
 }
============================================================
--- finch/gntpounce.c	d6cb407a5024f43b406ce480b1bab156f95db902
+++ finch/gntpounce.c	2afc7c0d495039c4fdb06158af2966b399df0b9d
@@ -42,6 +42,7 @@
 #include "accountlist.h"
 #include "conversation.h"
 #include "debug.h"
+#include "gsignal.h"
 #include "notify.h"
 #include "prpl.h"
 #include "request.h"
@@ -973,11 +974,9 @@ finch_pounces_init(void)
 						FALSE);
 	purple_prefs_add_none("/finch/pounces/dialog");
 
-	purple_signal_connect(NULL, "signed-on",
-						finch_pounces_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 						PURPLE_CALLBACK(signed_on_off_cb), NULL);
-	purple_signal_connect(NULL, "signed-off",
-						finch_pounces_get_handle(),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-off",
 						PURPLE_CALLBACK(signed_on_off_cb), NULL);
 }
 
============================================================
--- libpurple/example/nullclient.c	d3a7c6e0227485a15f940c9aea7fdcf758359e62
+++ libpurple/example/nullclient.c	e5206b2dda5c21b68001728d89a30ec10e25de10
@@ -25,6 +25,7 @@
 
 #include <glib.h>
 
+#include <gsignal.h>
 #include <signal.h>
 #include <string.h>
 #ifndef _WIN32
@@ -239,8 +240,7 @@ connect_to_signals_for_demonstration_pur
 static void
 connect_to_signals_for_demonstration_purposes_only(void)
 {
-	static int handle;
-	purple_signal_connect(NULL, "signed-on", &handle,
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
 				PURPLE_CALLBACK(signed_on), NULL);
 }
 
============================================================
--- finch/gntsound.c	feb89b6599af3484fd0f091ca464426f7c9525f3
+++ finch/gntsound.c	1b024964a69d32c6fe686c85b95243edfe1197a6
@@ -36,6 +36,7 @@
 #endif /* USE_GSTREAMER */
 
 #include "debug.h"
+#include "gsignal.h"
 #include "notify.h"
 #include "prefs.h"
 #include "sound.h"
@@ -361,8 +362,8 @@ finch_sound_init(void)
 	GError *error = NULL;
 #endif
 
-	purple_signal_connect(NULL, "signed-on",
-						gnt_sound_handle, PURPLE_CALLBACK(account_signon_cb),
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(account_signon_cb),
 						NULL);
 
 	purple_prefs_add_none(FINCH_PREFS_ROOT "/sound");
============================================================
--- pidgin/plugins/gevolution/gevolution.c	46ba6512ee7c12157034ee4fcf52eda481b21b1c
+++ pidgin/plugins/gevolution/gevolution.c	b4e1a972fa742b03e7625cc731df916971fd6731
@@ -346,8 +346,8 @@ plugin_load(PurplePlugin *plugin)
 
 	purple_blist_set_ui_ops(blist_ui_ops);
 
-	purple_signal_connect(NULL, "signed-on",
-						plugin, PURPLE_CALLBACK(signed_on_cb), NULL);
+	purple_g_signal_connect(PURPLE_TYPE_CONNECTION, "signed-on",
+						PURPLE_CALLBACK(signed_on_cb), NULL);
 
 	timer = g_timeout_add(1, load_timeout, plugin);
 


More information about the Commits mailing list