Mercurial > pidgin
diff src/proxy.c @ 6001:5e9364e9b29e
[gaim-migrate @ 6449]
This makes the global proxy settings usable, I think.
I think I'll try to get rid of PROXYHOST, PROXYPORT, etc. tomrrow.
For now? Sleep.
committer: Tailor Script <tailor@pidgin.im>
| author | Mark Doliner <mark@kingant.net> |
|---|---|
| date | Thu, 03 Jul 2003 04:49:38 +0000 |
| parents | 730015652f4d |
| children | 968a00c9f230 |
line wrap: on
line diff
--- a/src/proxy.c Thu Jul 03 03:23:27 2003 +0000 +++ b/src/proxy.c Thu Jul 03 04:49:38 2003 +0000 @@ -1585,9 +1585,23 @@ { GaimProxyInfo *info = gaim_global_proxy_get_info(); - if (!strcmp(name, "/core/proxy/type")) - gaim_proxy_info_set_type(info, GPOINTER_TO_INT(value)); - else if (!strcmp(name, "/core/proxy/host")) + if (!strcmp(name, "/core/proxy/type")) { + int proxytype; + char *type = value; + + if (!strcmp(type, "none")) + proxytype = GAIM_PROXY_NONE; + else if (!strcmp(type, "http")) + proxytype = GAIM_PROXY_HTTP; + else if (!strcmp(type, "socks4")) + proxytype = GAIM_PROXY_SOCKS4; + else if (!strcmp(type, "socks5")) + proxytype = GAIM_PROXY_SOCKS5; + else + proxytype = -1; + + gaim_proxy_info_set_type(info, proxytype); + } else if (!strcmp(name, "/core/proxy/host")) gaim_proxy_info_set_host(info, value); else if (!strcmp(name, "/core/proxy/port")) gaim_proxy_info_set_port(info, GPOINTER_TO_INT(value));
