[gaim-migrate @ 15187]

Thu, 12 Jan 2006 01:26:51 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Thu, 12 Jan 2006 01:26:51 +0000
changeset 12839
748f30ed8c9d
parent 12838
5c6f36abeee8
child 12840
548fd34f1f87

[gaim-migrate @ 15187]
Signal handlers are connected in plugin_load, not init_plugin.

plugins/idle.c file | annotate | diff | comparison | revisions
--- a/plugins/idle.c	Wed Jan 11 23:26:51 2006 +0000
+++ b/plugins/idle.c	Thu Jan 12 01:26:51 2006 +0000
@@ -265,6 +265,23 @@
 	return l;
 }
 
+static void
+signing_off_cb(GaimConnection *gc, void *data)
+{
+	GaimAccount *account;
+
+	account = gaim_connection_get_account(gc);
+	idled_accts = g_list_remove(idled_accts, account);
+}
+
+static gboolean
+plugin_load(GaimPlugin *plugin)
+{
+	gaim_signal_connect(gaim_connections_get_handle(), "signing-off",
+						plugin,
+						GAIM_CALLBACK(signing_off_cb), NULL);
+}
+
 static gboolean
 plugin_unload(GaimPlugin *plugin)
 {
@@ -290,7 +307,7 @@
 	N_("Allows you to hand-configure how long you've been idle"),
 	"Eric Warmenhoven <eric@warmenhoven.org>",
 	GAIM_WEBSITE,
-	NULL,
+	plugin_load,
 	plugin_unload,
 	NULL,
 	NULL,
@@ -300,20 +317,8 @@
 };
 
 static void
-signing_off_cb(GaimConnection *gc, void *data)
-{
-	GaimAccount *account;
-
-	account = gaim_connection_get_account(gc);
-	idled_accts = g_list_remove(idled_accts, account);
-}
-
-static void
 init_plugin(GaimPlugin *plugin)
 {
-	gaim_signal_connect(gaim_connections_get_handle(), "signing-off",
-						plugin,
-						GAIM_CALLBACK(signing_off_cb), NULL);
 }
 
 

mercurial