ben%netscape.com 453b811989 Part of 191524 -
Phoenix Preferences Dialog Redesign

- remove preferences tree and replace with large icon list (icons TBD)
- reorganize preferences throughout preferences dialog
- new privacy panel
- hook up "clear download manager," "clear form fill," "clear cookies," "clear passwords," etc.
- "clear all" button
and so on. Too much to list.


git-svn-id: svn://10.0.0.236/trunk@137254 18797224-902f-48f8-a5cc-f745e15eee43
2003-02-01 09:15:36 +00:00

120 lines
4.6 KiB
XML

<?xml version="1.0"?>
# The contents of this file are subject to the Netscape 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/NPL/
#
# 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 client code, released
# March 31, 1998.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998-2000 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<!DOCTYPE window SYSTEM "chrome://browser/locale/pref/pref-downloads.dtd" >
<page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="parent.initPanel('chrome://browser/content/pref/pref-downloads.xul');"
headertitle="&lHeader;">
<script type="application/x-javascript">
<![CDATA[
var _elementIDs = ["downloadDir", "defaultDir", "useProgressDialogs", "openDownloadsSidebar", "advancedMailFTP", "advancedMailFTPAddress"];
function selectFolder()
{
const nsIFilePicker = Components.interfaces.nsIFilePicker;
const nsILocalFile = Components.interfaces.nsILocalFile;
var fp = Components.classes["@mozilla.org/filepicker;1"]
.createInstance(nsIFilePicker);
var pref = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
// XXXBlake Localize!
fp.init(window, "Select Download Directory:", nsIFilePicker.modeGetFolder);
try
{
var initialDir = pref.getComplexValue("browser.download.dir", nsILocalFile);
if (initialDir)
fp.displayDirectory = initialDir;
}
catch (ex)
{
// ignore exception: file picker will open at default location
}
fp.appendFilters(nsIFilePicker.filterAll);
var ret = fp.show();
if (ret == nsIFilePicker.returnOK) {
var localFile = fp.file.QueryInterface(nsILocalFile);
var viewable = fp.file.path;
var folderField = document.getElementById("defaultDir");
folderField.value = viewable;
pref.setComplexValue("browser.download.dir", nsILocalFile, localFile)
}
}
function doEnabling(aSelectedItem)
{
var textbox = document.getElementById("defaultDir");
var button = document.getElementById("browse");
var disable = aSelectedItem.id == "dontUseIt";
textbox.disabled = disable;
button.disabled = disable;
}
function Startup()
{
ftpCheck();
}
function ftpCheck() {
var checked = document.getElementById("advancedMailFTP").checked;
var field = document.getElementById("advancedMailFTPAddress");
field.disabled = !checked;
if (checked)
field.focus();
}
]]>
</script>
<groupbox orient="horizontal">
<caption label="&defaultDir.label;"/>
<radiogroup id="downloadDir" onselect="doEnabling(this.selectedItem);" flex="1"
preftype="bool" prefstring="browser.download.useDownloadDir">
<radio id="dontUseIt" label="&rememberLast.label;" value="false"/>
<hbox flex="1">
<radio id="useIt" label="&useDownloadDir.label;" value="true"/>
<textbox id="defaultDir" flex="1" readonly="true" prefstring="browser.download.dir"/>
<button id="browse" label="&browse.label;" oncommand="selectFolder();"/>
</hbox>
</radiogroup>
</groupbox>
<groupbox>
<caption label="&whenStarting.label;"/>
<checkbox id="useProgressDialogs" label="&useProgressDialogs.label;" accesskey="&useProgressDialogs.accesskey;"
prefstring="browser.download.useProgressDialogs"/>
<checkbox id="openDownloadsSidebar" label="&openSidebar.label;"
prefstring="browser.download.openSidebar"/>
</groupbox>
<groupbox>
<caption label="&ftpSites.label;"/>
<checkbox id="advancedMailFTP" label="&sendAddFtpCheck.label;" accesskey="&sendAddFtpCheck.accesskey;"
prefstring="advanced.mailftp"
oncommand="ftpCheck();"/>
<hbox class="indent" flex="1">
<textbox id="advancedMailFTPAddress"
preftype="string" prefstring="network.ftp.anonymous_password"
flex="2"/>
</hbox>
</groupbox>
</page>