diff plugins/mailchk.c @ 6485:70d5122bc3ff

[gaim-migrate @ 6999] Removed the old event system and replaced it with a much better signal system. There will most likely be some bugs in this, but it seems to be working for now. Plugins can now generate their own signals, and other plugins can find those plugins and connect to them. This could give plugins a form of IPC. It's also useful for other things. It's rather flexible, except for the damn marshalling, but there's no way around that that I or the glib people can see. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 18 Aug 2003 01:03:43 +0000
parents 8f94cce8faa5
children cce494e69d68
line wrap: on
line diff
--- a/plugins/mailchk.c	Sun Aug 17 17:55:46 2003 +0000
+++ b/plugins/mailchk.c	Mon Aug 18 01:03:43 2003 +0000
@@ -113,6 +113,8 @@
 plugin_load(GaimPlugin *plugin)
 {
 	struct gaim_buddy_list *list = gaim_get_blist();
+	void *conn_handle = gaim_connections_get_handle();
+
 	if (!check_timeout(NULL)) {
 		gaim_debug(GAIM_DEBUG_WARNING, "mailchk", "Could not read $MAIL or /var/spool/mail/$USER");
 		return FALSE;
@@ -121,8 +123,10 @@
 	if (list && GAIM_IS_GTK_BLIST(list) && GAIM_GTK_BLIST(list)->vbox)
 		timer = g_timeout_add(2000, check_timeout, NULL);
 
-	gaim_signal_connect(plugin, event_signon, signon_cb, NULL);
-	gaim_signal_connect(plugin, event_signoff, signoff_cb, NULL);
+	gaim_signal_connect(conn_handle, "signed-on",
+						plugin, GAIM_CALLBACK(signon_cb), NULL);
+	gaim_signal_connect(conn_handle, "signed-off",
+						plugin, GAIM_CALLBACK(signoff_cb), NULL);
 
 	return TRUE;
 }