зеркало из https://github.com/mozilla/gecko-dev.git
Bug 257758 Add UI for WPAD and option for using the configured SOCKS proxy for DNS lookups to proxy preferences
r=neil, sr=shaver
This commit is contained in:
Родитель
f3b7088edc
Коммит
9eb09d6bd8
|
@ -95,20 +95,19 @@ function InitProxyMenu()
|
||||||
var networkProxyNo = document.getElementById("network-proxy-no");
|
var networkProxyNo = document.getElementById("network-proxy-no");
|
||||||
var networkProxyManual = document.getElementById("network-proxy-manual");
|
var networkProxyManual = document.getElementById("network-proxy-manual");
|
||||||
var networkProxyPac = document.getElementById("network-proxy-pac");
|
var networkProxyPac = document.getElementById("network-proxy-pac");
|
||||||
if (!networkProxyNo || !networkProxyManual || !networkProxyPac)
|
var networkProxyWpad = document.getElementById("network-proxy-wpad");
|
||||||
return;
|
|
||||||
|
|
||||||
var networkProxyStatus = [networkProxyNo, networkProxyManual, networkProxyPac];
|
|
||||||
var prefService = Components.classes["@mozilla.org/preferences-service;1"];
|
var prefService = Components.classes["@mozilla.org/preferences-service;1"];
|
||||||
prefService = prefService.getService(Components.interfaces.nsIPrefService);
|
prefService = prefService.getService(Components.interfaces.nsIPrefService);
|
||||||
var prefBranch = prefService.getBranch(null);
|
var prefBranch = prefService.getBranch(null);
|
||||||
|
|
||||||
var proxyLocked = prefBranch.prefIsLocked("network.proxy.type");
|
var proxyLocked = prefBranch.prefIsLocked("network.proxy.type");
|
||||||
if (proxyLocked) {
|
if (proxyLocked) {
|
||||||
networkProxyNo.setAttribute("disabled", "true");
|
networkProxyNo.setAttribute("disabled", "true");
|
||||||
|
networkProxyWpad.setAttribute("disabled", "true");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
networkProxyNo.removeAttribute("disabled");
|
networkProxyNo.removeAttribute("disabled");
|
||||||
|
networkProxyWpad.removeAttribute("disabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
// If no proxy is configured, disable the menuitems.
|
// If no proxy is configured, disable the menuitems.
|
||||||
|
@ -145,6 +144,10 @@ function InitProxyMenu()
|
||||||
networkProxyType = prefBranch.getIntPref("network.proxy.type");
|
networkProxyType = prefBranch.getIntPref("network.proxy.type");
|
||||||
} catch(e) {}
|
} catch(e) {}
|
||||||
|
|
||||||
|
// The pref value 3 for network.proxy.type is unused to maintain
|
||||||
|
// backwards compatibility. Treat 3 equally to 0. See bug 115720.
|
||||||
|
var networkProxyStatus = [networkProxyNo, networkProxyManual, networkProxyPac,
|
||||||
|
networkProxyNo, networkProxyWpad];
|
||||||
networkProxyStatus[networkProxyType].setAttribute("checked", "true");
|
networkProxyStatus[networkProxyType].setAttribute("checked", "true");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,18 +36,24 @@
|
||||||
label="&direct.label;"
|
label="&direct.label;"
|
||||||
accesskey="&direct.accesskey;"
|
accesskey="&direct.accesskey;"
|
||||||
oncommand="setNetworkStatus('0')"/>
|
oncommand="setNetworkStatus('0')"/>
|
||||||
<menuitem id="network-proxy-manual"
|
<menuitem id="network-proxy-wpad"
|
||||||
type="radio"
|
type="radio"
|
||||||
name="status"
|
name="status"
|
||||||
label="&manual.label;"
|
label="&wpad.label;"
|
||||||
accesskey="&manual.accesskey;"
|
accesskey="&wpad.accesskey;"
|
||||||
oncommand="setNetworkStatus('1')"/>
|
oncommand="setNetworkStatus('4')"/>
|
||||||
<menuitem id="network-proxy-pac"
|
<menuitem id="network-proxy-pac"
|
||||||
type="radio"
|
type="radio"
|
||||||
name="status"
|
name="status"
|
||||||
label="&pac.label;"
|
label="&pac.label;"
|
||||||
accesskey="&pac.accesskey;"
|
accesskey="&pac.accesskey;"
|
||||||
oncommand="setNetworkStatus('2')"/>
|
oncommand="setNetworkStatus('2')"/>
|
||||||
|
<menuitem id="network-proxy-manual"
|
||||||
|
type="radio"
|
||||||
|
name="status"
|
||||||
|
label="&manual.label;"
|
||||||
|
accesskey="&manual.accesskey;"
|
||||||
|
oncommand="setNetworkStatus('1')"/>
|
||||||
<menuseparator/>
|
<menuseparator/>
|
||||||
<menuitem label="&proxy.label;"
|
<menuitem label="&proxy.label;"
|
||||||
accesskey="&proxy.accesskey;"
|
accesskey="&proxy.accesskey;"
|
||||||
|
|
|
@ -71,12 +71,14 @@
|
||||||
<!ENTITY aboutCommPluginsCmd.label "About Plug-ins">
|
<!ENTITY aboutCommPluginsCmd.label "About Plug-ins">
|
||||||
<!ENTITY aboutCommPluginsCmd.accesskey "p">
|
<!ENTITY aboutCommPluginsCmd.accesskey "p">
|
||||||
|
|
||||||
<!ENTITY direct.label "Online (proxy: none)">
|
<!ENTITY direct.label "Online (Proxy: None)">
|
||||||
<!ENTITY direct.accesskey "n">
|
<!ENTITY direct.accesskey "N">
|
||||||
<!ENTITY manual.label "Online (proxy: manual)">
|
<!ENTITY manual.label "Online (Proxy: Manual)">
|
||||||
<!ENTITY manual.accesskey "m">
|
<!ENTITY manual.accesskey "M">
|
||||||
<!ENTITY pac.label "Online (proxy: auto)">
|
<!ENTITY pac.label "Online (Proxy: Auto URL)">
|
||||||
<!ENTITY pac.accesskey "a">
|
<!ENTITY pac.accesskey "A">
|
||||||
|
<!ENTITY wpad.label "Online (Proxy: Auto Discover)">
|
||||||
|
<!ENTITY wpad.accesskey "D">
|
||||||
|
|
||||||
<!ENTITY proxy.label "Proxy Configuration...">
|
<!ENTITY proxy.label "Proxy Configuration...">
|
||||||
<!ENTITY proxy.accesskey "C">
|
<!ENTITY proxy.accesskey "C">
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
onlineTooltip0=You are online (proxy: none). Click the icon to go offline.
|
onlineTooltip0=You are online (proxy: none). Click the icon to go offline.
|
||||||
onlineTooltip1=You are online (proxy: manual). Click the icon to go offline.
|
onlineTooltip1=You are online (proxy: manual). Click the icon to go offline.
|
||||||
onlineTooltip2=You are online (proxy: auto). Click the icon to go offline.
|
onlineTooltip2=You are online (proxy: auto URL). Click the icon to go offline.
|
||||||
|
onlineTooltip4=You are online (proxy: auto discover). Click the icon to go offline.
|
||||||
offlineTooltip=You are offline. Click the icon to go online.
|
offlineTooltip=You are offline. Click the icon to go online.
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче