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:
Stefan.Borggraefe%gmx.de 2006-07-29 05:43:43 +00:00
Родитель f3b7088edc
Коммит 9eb09d6bd8
4 изменённых файлов: 29 добавлений и 17 удалений

Просмотреть файл

@ -95,10 +95,7 @@ function InitProxyMenu()
var networkProxyNo = document.getElementById("network-proxy-no");
var networkProxyManual = document.getElementById("network-proxy-manual");
var networkProxyPac = document.getElementById("network-proxy-pac");
if (!networkProxyNo || !networkProxyManual || !networkProxyPac)
return;
var networkProxyStatus = [networkProxyNo, networkProxyManual, networkProxyPac];
var networkProxyWpad = document.getElementById("network-proxy-wpad");
var prefService = Components.classes["@mozilla.org/preferences-service;1"];
prefService = prefService.getService(Components.interfaces.nsIPrefService);
var prefBranch = prefService.getBranch(null);
@ -106,9 +103,11 @@ function InitProxyMenu()
var proxyLocked = prefBranch.prefIsLocked("network.proxy.type");
if (proxyLocked) {
networkProxyNo.setAttribute("disabled", "true");
networkProxyWpad.setAttribute("disabled", "true");
}
else {
networkProxyNo.removeAttribute("disabled");
networkProxyWpad.removeAttribute("disabled");
}
// If no proxy is configured, disable the menuitems.
@ -145,6 +144,10 @@ function InitProxyMenu()
networkProxyType = prefBranch.getIntPref("network.proxy.type");
} 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");
}

Просмотреть файл

@ -36,18 +36,24 @@
label="&direct.label;"
accesskey="&direct.accesskey;"
oncommand="setNetworkStatus('0')"/>
<menuitem id="network-proxy-manual"
<menuitem id="network-proxy-wpad"
type="radio"
name="status"
label="&manual.label;"
accesskey="&manual.accesskey;"
oncommand="setNetworkStatus('1')"/>
label="&wpad.label;"
accesskey="&wpad.accesskey;"
oncommand="setNetworkStatus('4')"/>
<menuitem id="network-proxy-pac"
type="radio"
name="status"
label="&pac.label;"
accesskey="&pac.accesskey;"
oncommand="setNetworkStatus('2')"/>
<menuitem id="network-proxy-manual"
type="radio"
name="status"
label="&manual.label;"
accesskey="&manual.accesskey;"
oncommand="setNetworkStatus('1')"/>
<menuseparator/>
<menuitem label="&proxy.label;"
accesskey="&proxy.accesskey;"

Просмотреть файл

@ -71,12 +71,14 @@
<!ENTITY aboutCommPluginsCmd.label "About Plug-ins">
<!ENTITY aboutCommPluginsCmd.accesskey "p">
<!ENTITY direct.label "Online (proxy: none)">
<!ENTITY direct.accesskey "n">
<!ENTITY manual.label "Online (proxy: manual)">
<!ENTITY manual.accesskey "m">
<!ENTITY pac.label "Online (proxy: auto)">
<!ENTITY pac.accesskey "a">
<!ENTITY direct.label "Online (Proxy: None)">
<!ENTITY direct.accesskey "N">
<!ENTITY manual.label "Online (Proxy: Manual)">
<!ENTITY manual.accesskey "M">
<!ENTITY pac.label "Online (Proxy: Auto URL)">
<!ENTITY pac.accesskey "A">
<!ENTITY wpad.label "Online (Proxy: Auto Discover)">
<!ENTITY wpad.accesskey "D">
<!ENTITY proxy.label "Proxy Configuration...">
<!ENTITY proxy.accesskey "C">

Просмотреть файл

@ -1,6 +1,7 @@
onlineTooltip0=You are online (proxy: none). 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.