diff src/gtkutils.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 fb64cc87bc96
children b89d98f0bf79
line wrap: on
line diff
--- a/src/gtkutils.c	Sun Aug 17 17:55:46 2003 +0000
+++ b/src/gtkutils.c	Mon Aug 18 01:03:43 2003 +0000
@@ -40,6 +40,7 @@
 #include "notify.h"
 #include "prefs.h"
 #include "prpl.h"
+#include "signals.h"
 #include "util.h"
 
 #include "gtkconv.h"
@@ -887,8 +888,7 @@
 account_menu_destroyed_cb(GtkWidget *optmenu, GdkEvent *event,
 						  void *user_data)
 {
-	gaim_signal_disconnect(optmenu, event_signon,  account_menu_sign_on_off_cb);
-	gaim_signal_disconnect(optmenu, event_signoff, account_menu_sign_on_off_cb);
+	gaim_signals_disconnect_by_handle(optmenu);
 
 	return FALSE;
 }
@@ -908,10 +908,12 @@
 					 G_CALLBACK(account_menu_destroyed_cb), NULL);
 
 	/* Register the gaim sign on/off event callbacks. */
-	gaim_signal_connect(optmenu, event_signon,
-						account_menu_sign_on_off_cb, optmenu);
-	gaim_signal_connect(optmenu, event_signoff,
-						account_menu_sign_on_off_cb, optmenu);
+	gaim_signal_connect(gaim_connections_get_handle(), "signed-on",
+						optmenu, GAIM_CALLBACK(account_menu_sign_on_off_cb),
+						optmenu);
+	gaim_signal_connect(gaim_connections_get_handle(), "signed-off",
+						optmenu, GAIM_CALLBACK(account_menu_sign_on_off_cb),
+						optmenu);
 
 	/* Set some data. */
 	g_object_set_data(G_OBJECT(optmenu), "user_data", user_data);