Bug #255479 --> advanced preferences panel re-org.

Move the proxy connection settings into a separate dialog.

eliminate the e-mail address auto collection category header.
This commit is contained in:
scott%scott-macgregor.org 2004-08-13 06:46:07 +00:00
Родитель f99b3b8868
Коммит 637c48a0c7
7 изменённых файлов: 118 добавлений и 326 удалений

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

@ -1,180 +0,0 @@
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# The contents of this file are subject to the Mozilla Public License Version
# 1.1 (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
# http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language governing rights and limitations under the
# License.
#
# The Original Code is Mozilla Communicator.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corp.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Sean Su <ssu@netscape.com>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
var receiptSend;
var notInToCcPref;
var notInToCcLabel;
var outsideDomainPref;
var outsideDomainLabel;
var otherCasesPref;
var otherCasesLabel;
function Startup()
{
// return receipt startup
receiptSend = document.getElementById("receiptSend");
notInToCcPref = document.getElementById("notInToCcPref");
notInToCcLabel = document.getElementById("notInToCcLabel");
outsideDomainPref = document.getElementById("outsideDomainPref");
outsideDomainLabel = document.getElementById("outsideDomainLabel");
otherCasesPref = document.getElementById("otherCasesPref");
otherCasesLabel = document.getElementById("otherCasesLabel");
EnableDisableAllowedReceipts();
// proxy connection
DoEnabling();
toggleRemoteImagesPrefUI(document.getElementById('networkImageDisableImagesInMailNews'));
return true;
}
// return receipts....
function EnableDisableAllowedReceipts() {
if (receiptSend && (receiptSend.getAttribute("value") == "false")) {
notInToCcPref.setAttribute("disabled", "true");
notInToCcLabel.setAttribute("disabled", "true");
outsideDomainPref.setAttribute("disabled", "true");
outsideDomainLabel.setAttribute("disabled", "true");
otherCasesPref.setAttribute("disabled", "true");
otherCasesLabel.setAttribute("disabled", "true");
}
else {
notInToCcPref.removeAttribute("disabled");
notInToCcLabel.removeAttribute("disabled");
outsideDomainPref.removeAttribute("disabled");
outsideDomainLabel.removeAttribute("disabled");
otherCasesPref.removeAttribute("disabled");
otherCasesLabel.removeAttribute("disabled");
}
return true;
}
// proxy config support
function DoEnabling()
{
var i;
var http = document.getElementById("networkProxyHTTP");
var httpPort = document.getElementById("networkProxyHTTP_Port");
var socks = document.getElementById("networkProxySOCKS");
var socksPort = document.getElementById("networkProxySOCKS_Port");
var socksVersion = document.getElementById("networkProxySOCKSVersion");
var socksVersion4 = document.getElementById("networkProxySOCKSVersion4");
var socksVersion5 = document.getElementById("networkProxySOCKSVersion5");
var ssl = document.getElementById("networkProxySSL");
var sslPort = document.getElementById("networkProxySSL_Port");
var noProxy = document.getElementById("networkProxyNone");
var autoURL = document.getElementById("networkProxyAutoconfigURL");
var autoReload = document.getElementById("autoReload");
// convenience arrays
var manual = [http, httpPort, socks, socksPort, socksVersion, socksVersion4, socksVersion5, ssl, sslPort, noProxy];
var auto = [autoURL, autoReload];
// radio buttons
var radiogroup = document.getElementById("networkProxyType");
switch ( radiogroup.value ) {
case "0":
for (i = 0; i < manual.length; i++)
manual[i].setAttribute( "disabled", "true" );
for (i = 0; i < auto.length; i++)
auto[i].setAttribute( "disabled", "true" );
break;
case "1":
for (i = 0; i < auto.length; i++)
auto[i].setAttribute( "disabled", "true" );
if (!radiogroup.disabled)
for (i = 0; i < manual.length; i++)
manual[i].removeAttribute( "disabled" );
break;
case "2":
default:
for (i = 0; i < manual.length; i++)
manual[i].setAttribute( "disabled", "true" );
if (!radiogroup.disabled)
for (i = 0; i < auto.length; i++)
auto[i].removeAttribute( "disabled" );
break;
}
}
function toggleRemoteImagesPrefUI(aCheckbox)
{
if (aCheckbox.checked)
{
document.getElementById('useWhiteList').removeAttribute('disabled');
document.getElementById('whiteListAbURI').removeAttribute('disabled');
}
else
{
document.getElementById('useWhiteList').setAttribute('disabled', 'true');
document.getElementById('whiteListAbURI').setAttribute('disabled', 'true');
}
}
const nsIProtocolProxyService = Components.interfaces.nsIProtocolProxyService;
const kPROTPROX_CID = '{e9b301c0-e0e4-11D3-a1a8-0050041caf44}';
function ReloadPAC() {
var autoURL = document.getElementById("networkProxyAutoconfigURL");
var pps = Components.classesByID[kPROTPROX_CID]
.getService(nsIProtocolProxyService);
pps.configureFromPAC(autoURL.value);
}
// Password Management
function editPasswords()
{
window.openDialog("chrome://communicator/content/wallet/SignonViewer.xul","_blank","chrome,centerscreen,resizable=yes", "S");
}
function editMasterPassword()
{
window.openDialog("chrome://messenger/content/pref-masterpass.xul","_blank","chrome,centerscreen,resizable=yes", "masterPassword");
}
function checkForUpdates()
{
var updates = Components.classes["@mozilla.org/updates/update-service;1"]
.getService(Components.interfaces.nsIUpdateService);
updates.checkForUpdates([], 0, Components.interfaces.nsIUpdateItem.TYPE_ANY,
Components.interfaces.nsIUpdateService.SOURCE_EVENT_USER,
window);
}

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

@ -70,15 +70,7 @@
"showCondensedAddresses", "markAsRead", "markAsReadDelay", "showFolderPaneColumns",
// smart update
"enableSmartUpdate", "enableExtensionUpdate",
// connection
"networkProxyType",
"networkProxyHTTP", "networkProxyHTTP_Port",
"networkProxySOCKS", "networkProxySOCKS_Port",
"networkProxySOCKSVersion",
"networkProxySSL", "networkProxySSL_Port",
"networkProxyNone", "networkProxyAutoconfigURL"];
"enableSmartUpdate", "enableExtensionUpdate"];
]]>
</script>
@ -139,22 +131,20 @@
<hbox align="center" pack="start">
<checkbox id="showFolderPaneColumns" label="&showFolderColumns.label;" prefstring="mail.showFolderPaneColumns"/>
</hbox>
</expander>
<expander id="softwareupdate" label="&softwareupdate.label;"
open="true" persist="open" clearhidden="true" align="left">
<label>&softwareupdateinfo.label;</label>
<vbox class="indent" align="left">
<checkbox id="enableSmartUpdate"
label="&enableSmartUpdate.label;" accesskey="&enableSmartUpdate.accesskey;"
prefstring="update.app.enabled"/>
<checkbox id="enableExtensionUpdate"
label="&enableExtensionUpdate.label;" accesskey="&enableExtensionUpdate.accesskey;"
prefstring="update.extensions.enabled"/>
<separator class="thin"/>
<button label="&checkNow.label;" accesskey="&checkNow.accesskey;"
oncommand="checkForUpdates();"/>
</vbox>
<hbox align="center" pack="start">
<checkbox id="emailCollectionOutgoing" label="&emailCollectionPicker.label;" prefstring="mail.collect_email_address_outgoing"/>
<menulist id="localDirectoriesList" preftype="string" prefstring="mail.collect_addressbook">
<menupopup id="abPopup-menupopup" ref="moz-abdirectory://" datasources="rdf:addressdirectory" sortActive="true"
sortDirection="ascending" sortResource="http://home.netscape.com/NC-rdf#DirTreeNameSort">
<template>
<rule nc:IsWriteable="false"/>
<rule nc:IsMailList="false">
<menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#DirName" value="rdf:http://home.netscape.com/NC-rdf#DirUri"/>
</rule>
</template>
</menupopup>
</menulist>
</hbox>
</expander>
<!-- Password management -->
@ -174,22 +164,12 @@
</hbox>
</expander>
<!-- Email Collection -->
<expander id="emailCollection" label="&emailCollectiontitle.label;" persist="open" clearhidden="true">
<description flex="1">&emailCollectiontext.label;</description>
<hbox align="center" class="indent">
<checkbox id="emailCollectionOutgoing" label="&emailCollectionPicker.label;" prefstring="mail.collect_email_address_outgoing"/>
<menulist id="localDirectoriesList" preftype="string" prefstring="mail.collect_addressbook">
<menupopup id="abPopup-menupopup" ref="moz-abdirectory://" datasources="rdf:addressdirectory" sortActive="true"
sortDirection="ascending" sortResource="http://home.netscape.com/NC-rdf#DirTreeNameSort">
<template>
<rule nc:IsWriteable="false"/>
<rule nc:IsMailList="false">
<menuitem uri="..." label="rdf:http://home.netscape.com/NC-rdf#DirName" value="rdf:http://home.netscape.com/NC-rdf#DirUri"/>
</rule>
</template>
</menupopup>
</menulist>
<!-- Connections -->
<expander id="connections" label="&lHeader.label;" persist="open" clearhidden="true">
<hbox align="center" pack="end">
<label class="expanderDescription" value="&connectionDesc.label;" flex="1"/>
<button label="&connectionButton.label;" accesskey="&connectionButton.accesskey;"
oncommand="showConnections();"/>
</hbox>
</expander>
@ -257,81 +237,20 @@
</radiogroup>
</expander>
<!-- Connections -->
<expander id="connections" label="&lHeader.label;" persist="open" clearhidden="true">
<radiogroup id="networkProxyType" prefstring="network.proxy.type">
<radio value="0" label="&directTypeRadio.label;" accesskey="&directTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<radio value="1" label="&manualTypeRadio.label;" accesskey="&manualTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<grid class="indent">
<columns>
<column/>
<column flex="1"/>
</columns>
<rows>
<row align="center">
<hbox pack="end">
<label value="&http.label;" accesskey="&http.accesskey;" control="networkProxyHTTP"/>
</hbox>
<textbox id="networkProxyHTTP" preftype="string" prefstring="network.proxy.http"/>
<label value="&port.label;" accesskey="&HTTPport.accesskey;" control="networkProxyHTTP_Port"/>
<textbox id="networkProxyHTTP_Port" preftype="int" prefstring="network.proxy.http_port"
size="5"/>
</row>
<row align="center">
<hbox pack="end">
<label value="&ssl.label;" accesskey="&ssl.accesskey;" control="networkProxySSL"/>
</hbox>
<textbox id="networkProxySSL" preftype="string" prefstring="network.proxy.ssl"/>
<label value="&port.label;" accesskey="&SSLport.accesskey;" control="networkProxySSL_Port"/>
<textbox id="networkProxySSL_Port" preftype="int" prefstring="network.proxy.ssl_port"
size="5"/>
</row>
<row align="center">
<hbox pack="end">
<label value="&socks.label;" accesskey="&socks.accesskey;" control="networkProxySOCKS"/>
</hbox>
<textbox id="networkProxySOCKS" preftype="string" prefstring="network.proxy.socks"/>
<label value="&port.label;" accesskey="&SOCKSport.accesskey;" control="networkProxySOCKS_Port"/>
<textbox id="networkProxySOCKS_Port" preftype="int" prefstring="network.proxy.socks_port"
size="5"/>
</row>
<row>
<spacer/>
<radiogroup id="networkProxySOCKSVersion" orient="horizontal"
prefstring="network.proxy.socks_version">
<radio id="networkProxySOCKSVersion4" value="4" label="&socks4.label;" accesskey="&socks4.accesskey;"/>
<radio id="networkProxySOCKSVersion5" value="5" label="&socks5.label;" accesskey="&socks5.accesskey;"/>
</radiogroup>
</row>
<row align="center">
<hbox pack="end">
<label value="&noproxy.label;" accesskey="&noproxy.accesskey;" control="networkProxyNone"/>
</hbox>
<textbox id="networkProxyNone" preftype="string" prefstring="network.proxy.no_proxies_on"/>
</row>
<row>
<spacer/>
<label value="&noproxyExplain.label;" control="networkProxyNone"/>
</row>
</rows>
</grid>
<radio value="2" label="&autoTypeRadio.label;" accesskey="&autoTypeRadio.accesskey;" oncommand="DoEnabling();"/>
<hbox class="indent" align="center">
<textbox id="networkProxyAutoconfigURL" flex="1"
preftype="string" prefstring="network.proxy.autoconfig_url"/>
<button id="autoReload" label="&reload.label;" accesskey="&reload.accesskey;"
oncommand="ReloadPAC();"
prefstring="pref.advanced.proxies.disable_button.reload"/>
</hbox>
</radiogroup>
<expander id="softwareupdate" label="&softwareupdate.label;"
open="true" persist="open" clearhidden="true" align="left">
<label>&softwareupdateinfo.label;</label>
<vbox class="indent" align="left">
<checkbox id="enableSmartUpdate"
label="&enableSmartUpdate.label;" accesskey="&enableSmartUpdate.accesskey;"
prefstring="update.app.enabled"/>
<checkbox id="enableExtensionUpdate"
label="&enableExtensionUpdate.label;" accesskey="&enableExtensionUpdate.accesskey;"
prefstring="update.extensions.enabled"/>
<separator class="thin"/>
<button label="&checkNow.label;" accesskey="&checkNow.accesskey;"
oncommand="checkForUpdates();"/>
</vbox>
</expander>
</vbox>

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

@ -0,0 +1,75 @@
var _elementIDs = ["networkProxyType",
"networkProxyHTTP", "networkProxyHTTP_Port",
"networkProxySOCKS", "networkProxySOCKS_Port",
"networkProxySOCKSVersion",
"networkProxySSL", "networkProxySSL_Port",
"networkProxyNone", "networkProxyAutoconfigURL" ];
function Startup()
{
DoEnabling();
}
// proxy config support
function DoEnabling()
{
var i;
var http = document.getElementById("networkProxyHTTP");
var httpPort = document.getElementById("networkProxyHTTP_Port");
var socks = document.getElementById("networkProxySOCKS");
var socksPort = document.getElementById("networkProxySOCKS_Port");
var socksVersion = document.getElementById("networkProxySOCKSVersion");
var socksVersion4 = document.getElementById("networkProxySOCKSVersion4");
var socksVersion5 = document.getElementById("networkProxySOCKSVersion5");
var ssl = document.getElementById("networkProxySSL");
var sslPort = document.getElementById("networkProxySSL_Port");
var noProxy = document.getElementById("networkProxyNone");
var autoURL = document.getElementById("networkProxyAutoconfigURL");
var autoReload = document.getElementById("autoReload");
// convenience arrays
var manual = [http, httpPort, socks, socksPort, socksVersion, socksVersion4, socksVersion5, ssl, sslPort, noProxy];
var auto = [autoURL, autoReload];
// radio buttons
var radiogroup = document.getElementById("networkProxyType");
switch ( radiogroup.value ) {
case "0":
for (i = 0; i < manual.length; i++)
manual[i].setAttribute( "disabled", "true" );
for (i = 0; i < auto.length; i++)
auto[i].setAttribute( "disabled", "true" );
break;
case "1":
for (i = 0; i < auto.length; i++)
auto[i].setAttribute( "disabled", "true" );
if (!radiogroup.disabled)
for (i = 0; i < manual.length; i++)
manual[i].removeAttribute( "disabled" );
break;
case "2":
default:
for (i = 0; i < manual.length; i++)
manual[i].setAttribute( "disabled", "true" );
if (!radiogroup.disabled)
for (i = 0; i < auto.length; i++)
auto[i].removeAttribute( "disabled" );
break;
}
}
const nsIProtocolProxyService = Components.interfaces.nsIProtocolProxyService;
const kPROTPROX_CID = '{e9b301c0-e0e4-11D3-a1a8-0050041caf44}';
function ReloadPAC() {
var autoURL = document.getElementById("networkProxyAutoconfigURL");
var pps = Components.classesByID[kPROTPROX_CID]
.getService(nsIProtocolProxyService);
pps.configureFromPAC(autoURL.value);
}
function onConnectionsDialogOK()
{
window.opener.top.hPrefWindow.wsm.savePageData(window.location.href, window);
return true;
}

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

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

@ -8,6 +8,8 @@ messenger.jar:
*+ content/messenger/pref-advanced.xul (content/pref-advanced.xul)
*+ content/messenger/pref-advanced.js (content/pref-advanced.js)
content/messenger/pref-masterpass.xul (content/pref-masterpass.xul)
content/messenger/pref-connection.xul (content/pref-connection.xul)
content/messenger/pref-connection.js (content/pref-connection.js)
comm.jar:
+ content/communicator/pref/pref.xul (content/pref.xul)
@ -28,6 +30,7 @@ en-US.jar:
+ locale/en-US/messenger/AccountManager.dtd (locale/AccountManager.dtd)
+ locale/en-US/messenger/pref-advanced.dtd (locale/pref-advanced.dtd)
+ locale/en-US/messenger/pref-masterpass.dtd (locale/pref-masterpass.dtd)
locale/en-US/messenger/pref-connection.dtd (locale/pref-connection.dtd)
+ locale/en-US/mozapps/downloads/pref-downloads.dtd (locale/pref-downloads.dtd)
en-win.jar:

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

@ -24,6 +24,8 @@
<!ENTITY markAsRead.label "Mark message read after displaying for">
<!ENTITY markAsReadEnd.label "second(s).">
<!ENTITY showFolderColumns.label "Show expanded columns in the folder pane.">
<!ENTITY emailCollectionPicker.label "Automatically add outgoing e-mail addresses to my:">
<!-- Return Receipts -->
<!ENTITY receiptSettings.label "Return Receipts">
@ -49,37 +51,10 @@
<!ENTITY alwaysSend.label "Always send">
<!ENTITY neverSend.label "Never send">
<!-- Address book collection -->
<!ENTITY emailCollectiontitle.label "Email Address Collection">
<!ENTITY emailCollectionPicker.label "Add email addresses to my:">
<!ENTITY emailCollectiontext.label "Email addresses from outgoing messages can be automatically added to a local address book.">
<!ENTITY lHeader.label "Connection">
<!ENTITY directTypeRadio.label "Direct connection to the Internet">
<!ENTITY directTypeRadio.accesskey "d">
<!ENTITY manualTypeRadio.label "Manual proxy configuration">
<!ENTITY manualTypeRadio.accesskey "m">
<!ENTITY http.label "HTTP Proxy:">
<!ENTITY http.accesskey "h">
<!ENTITY ssl.label "SSL Proxy:">
<!ENTITY ssl.accesskey "s">
<!ENTITY socks.label "SOCKS Host:">
<!ENTITY socks.accesskey "c">
<!ENTITY socks4.label "SOCKS v4">
<!ENTITY socks4.accesskey "k">
<!ENTITY socks5.label "SOCKS v5">
<!ENTITY socks5.accesskey "v">
<!ENTITY port.label "Port:">
<!ENTITY HTTPport.accesskey "p">
<!ENTITY SSLport.accesskey "o">
<!ENTITY SOCKSport.accesskey "t">
<!ENTITY noproxy.label "No Proxy for:">
<!ENTITY noproxy.accesskey "n">
<!ENTITY noproxyExplain.label "Example: .mozilla.org, .net.nz">
<!ENTITY autoTypeRadio.label "Automatic proxy configuration URL:">
<!ENTITY autoTypeRadio.accesskey "a">
<!ENTITY reload.label "Reload">
<!ENTITY reload.accesskey "l">
<!ENTITY connectionDesc.label "Set up Proxies for accessing the internet.">
<!ENTITY connectionButton.label "Connection Settings...">
<!ENTITY connectionButton.accesskey "C">
<!-- Software Update -->
<!ENTITY softwareupdate.label "Software Update">

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