зеркало из https://github.com/mozilla/gecko-dev.git
Bug 259076. Use gconf system prefs for proxy-type and other proxy settings. r=darin,sr=roc, patch by Ganesh (Novell)
This commit is contained in:
Родитель
e5be3653c9
Коммит
d1351875be
|
@ -7,6 +7,13 @@
|
|||
|
||||
{"network.proxy.http", "/system/http_proxy/host"},
|
||||
{"network.proxy.http_port", "/system/http_proxy/port"},
|
||||
{"network.proxy.ftp", "/system/ftp_proxy/host"},
|
||||
{"network.proxy.ftp_port", "/system/ftp_proxy/port"},
|
||||
{"network.proxy.ftp", "/system/proxy/ftp_host"},
|
||||
{"network.proxy.ftp_port", "/system/proxy/ftp_port"},
|
||||
{"network.proxy.ssl", "/system/proxy/secure_host"},
|
||||
{"network.proxy.ssl_port", "/system/proxy/secure_port"},
|
||||
{"network.proxy.socks", "/system/proxy/socks_host"},
|
||||
{"network.proxy.socks_port", "/system/proxy/socks_port"},
|
||||
{"network.proxy.no_proxies_on", "/system/proxy/ignore_hosts"},
|
||||
{"network.proxy.autoconfig_url", "/system/proxy/autoconfig_url"},
|
||||
{"network.proxy.type", "/system/proxy/mode"},
|
||||
{"config.use_system_prefs.accessibility", "/desktop/gnome/interface/accessibility"},
|
||||
|
|
|
@ -702,7 +702,28 @@ nsresult
|
|||
GConfProxy::GetIntPref(const char *aMozKey, PRInt32 *retval)
|
||||
{
|
||||
NS_ENSURE_TRUE(mInitialized, NS_ERROR_FAILURE);
|
||||
*retval = GConfClientGetInt(mGConfClient, MozKey2GConfKey(aMozKey), NULL);
|
||||
if (strcmp (aMozKey, "network.proxy.type") == 0) {
|
||||
gchar *str;
|
||||
|
||||
str = GConfClientGetString(mGConfClient,
|
||||
MozKey2GConfKey (aMozKey), NULL);
|
||||
|
||||
if (str) {
|
||||
if (strcmp (str, "manual") == 0)
|
||||
*retval = 1;
|
||||
else if (strcmp (str, "auto") == 0)
|
||||
*retval = 2;
|
||||
else
|
||||
*retval = 0;
|
||||
|
||||
g_free (str);
|
||||
} else
|
||||
*retval = 0;
|
||||
} else {
|
||||
*retval = GConfClientGetInt(mGConfClient,
|
||||
MozKey2GConfKey(aMozKey), NULL);
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,6 +73,13 @@ static const char *sSysPrefList[] = {
|
|||
"network.proxy.http_port",
|
||||
"network.proxy.ftp",
|
||||
"network.proxy.ftp_port",
|
||||
"network.proxy.ssl",
|
||||
"network.proxy.ssl_port",
|
||||
"network.proxy.socks",
|
||||
"network.proxy.socks_port",
|
||||
"network.proxy.no_proxies_on",
|
||||
"network.proxy.autoconfig_url",
|
||||
"network.proxy.type",
|
||||
"config.use_system_prefs.accessibility",
|
||||
};
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче