Mercurial > pidgin.yaz
diff plugins/idle.c @ 12839:2bf82fdddf5e
[gaim-migrate @ 15187]
Signal handlers are connected in plugin_load, not init_plugin.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Thu, 12 Jan 2006 01:26:51 +0000 |
parents | 74eb10cead7f |
children | 890c6429bc61 |
line wrap: on
line diff
--- 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); }