comparison 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
comparison
equal deleted inserted replaced
10086:6cd2b467e303 10087:9fdbfe832fac
1599 } 1599 }
1600 1600
1601 void 1601 void
1602 gaim_proxy_init(void) 1602 gaim_proxy_init(void)
1603 { 1603 {
1604 void *handle;
1605
1604 /* Initialize a default proxy info struct. */ 1606 /* Initialize a default proxy info struct. */
1605 global_proxy_info = gaim_proxy_info_new(); 1607 global_proxy_info = gaim_proxy_info_new();
1606 1608
1607 /* Proxy */ 1609 /* Proxy */
1608 gaim_prefs_add_none("/core/proxy"); 1610 gaim_prefs_add_none("/core/proxy");
1611 gaim_prefs_add_int("/core/proxy/port", 0); 1613 gaim_prefs_add_int("/core/proxy/port", 0);
1612 gaim_prefs_add_string("/core/proxy/username", ""); 1614 gaim_prefs_add_string("/core/proxy/username", "");
1613 gaim_prefs_add_string("/core/proxy/password", ""); 1615 gaim_prefs_add_string("/core/proxy/password", "");
1614 1616
1615 /* Setup callbacks for the preferences. */ 1617 /* Setup callbacks for the preferences. */
1616 gaim_prefs_connect_callback("/core/proxy/type", 1618 handle = gaim_proxy_get_handle();
1619 gaim_prefs_connect_callback(handle, "/core/proxy/type",
1617 proxy_pref_cb, NULL); 1620 proxy_pref_cb, NULL);
1618 gaim_prefs_connect_callback("/core/proxy/host", 1621 gaim_prefs_connect_callback(handle, "/core/proxy/host",
1619 proxy_pref_cb, NULL); 1622 proxy_pref_cb, NULL);
1620 gaim_prefs_connect_callback("/core/proxy/port", 1623 gaim_prefs_connect_callback(handle, "/core/proxy/port",
1621 proxy_pref_cb, NULL); 1624 proxy_pref_cb, NULL);
1622 gaim_prefs_connect_callback("/core/proxy/username", 1625 gaim_prefs_connect_callback(handle, "/core/proxy/username",
1623 proxy_pref_cb, NULL); 1626 proxy_pref_cb, NULL);
1624 gaim_prefs_connect_callback("/core/proxy/password", 1627 gaim_prefs_connect_callback(handle, "/core/proxy/password",
1625 proxy_pref_cb, NULL); 1628 proxy_pref_cb, NULL);
1626 } 1629 }
1630
1631 void *
1632 gaim_proxy_get_handle()
1633 {
1634 static int handle;
1635
1636 return &handle;
1637 }