diff src/proxy.c @ 10087:9fdbfe832fac

[gaim-migrate @ 11098] gaim_prefs_connect_callback() now takes a handle that can be used to disconnect the callbacks later on. The callback id's remain, so people can still use those if they want, although I'm not sure if there's any need for them any more. I also switched the order for initializing the prefs subsystem and statically compiled protocol plugins so that prpl prefs can work for statically compiled prpls. committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Tue, 12 Oct 2004 00:49:19 +0000
parents 0e3a84f18467
children 3c88c2f1b732
line wrap: on
line diff
--- a/src/proxy.c	Sun Oct 10 16:47:56 2004 +0000
+++ b/src/proxy.c	Tue Oct 12 00:49:19 2004 +0000
@@ -1601,6 +1601,8 @@
 void
 gaim_proxy_init(void)
 {
+	void *handle;
+
 	/* Initialize a default proxy info struct. */
 	global_proxy_info = gaim_proxy_info_new();
 
@@ -1613,14 +1615,23 @@
 	gaim_prefs_add_string("/core/proxy/password", "");
 
 	/* Setup callbacks for the preferences. */
-	gaim_prefs_connect_callback("/core/proxy/type",
+	handle = gaim_proxy_get_handle();
+	gaim_prefs_connect_callback(handle, "/core/proxy/type",
 								proxy_pref_cb, NULL);
-	gaim_prefs_connect_callback("/core/proxy/host",
+	gaim_prefs_connect_callback(handle, "/core/proxy/host",
 								proxy_pref_cb, NULL);
-	gaim_prefs_connect_callback("/core/proxy/port",
+	gaim_prefs_connect_callback(handle, "/core/proxy/port",
 								proxy_pref_cb, NULL);
-	gaim_prefs_connect_callback("/core/proxy/username",
+	gaim_prefs_connect_callback(handle, "/core/proxy/username",
 								proxy_pref_cb, NULL);
-	gaim_prefs_connect_callback("/core/proxy/password",
+	gaim_prefs_connect_callback(handle, "/core/proxy/password",
 								proxy_pref_cb, NULL);
 }
+
+void *
+gaim_proxy_get_handle()
+{
+	static int handle;
+
+	return &handle;
+}