The Mother Of All Download Landings, Phase I

http://bugzilla.mozilla.org/show_bug.cgi?id=214259
Firebird Download System Upgrades.

components/prefwindow/content/pref-privacy.xul
components/prefwindow/content/pref-privacy.js
components/prefwindow/locale/pref-privacy.dtd
- Download Manager Options (UI only, no code yet)
This commit is contained in:
ben%bengoodger.com 2003-08-04 22:41:57 +00:00
Родитель 595de13a82
Коммит bf6ecfcb54
3 изменённых файлов: 41 добавлений и 3 удалений

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

@ -38,7 +38,8 @@
var _elementIDs = ["histDay", "browserCacheDiskCache", "enableCookies",
"enableCookiesForOriginatingSiteOnly", "enableCookiesForCurrentSessionOnly",
"enableCookiesButAskFirst", "enableFormFill", "enablePasswords"];
"enableCookiesButAskFirst", "enableFormFill", "enablePasswords",
"downloadsRetentionPolicy"];
function Startup() {
var cookiesEnabled = document.getElementById("enableCookies").checked;
@ -78,6 +79,25 @@ function Startup() {
var categories = document.getElementById("privacyCategories");
categories.addEventListener("clear", PrivacyPanel.clear, false);
// XXXben - we do this because of a bug with the download retention window menulist.
// The bug is that when the Options dialog opens, or you switch from another panel to
// this panel, style is incompletely resolved on the menulist's display area anonymous
// content - it is resolved on the all a/c subcomponents *except* menulist-label (the
// text nodes)... and (as a result, I think) when style is resolved later as the menulist
// goes from visbility: collapse to being visible, the menulist-label has the wrong parent
// style context which causes the style context parent checking to complain heartily. The
// symptom is that the menulist is not initialized with the currently selected value from
// preferences. I suspect this is related to the fact that the menulist is inserted into
// an XBL insertion point, as this problem does not occur when the menulist is placed outside
// the bound element. dbaron is helping me with this with a reduced test case, but in
// the meantime, I'm working around this bug by placing the menulist outside the bound element
// until it is completely initialized and then scooting it in, which is what this code does.
var drb = document.getElementById("downloadsRetentionBox");
var drp = document.getElementById("downloadsRetentionPolicy");
drp.removeAttribute("hidden");
document.documentElement.removeChild(drp);
drb.appendChild(drp);
}
function unload()

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

@ -88,7 +88,11 @@
<!-- Downloaded Files List -->
<expander id="downloads" label="&downloads.label;" clearlabel="&clearDownloads.label;" persist="open">
<description>&downloadsDescription.label;</description>
<!-- XXX - need option to disable download manager list, and number of days used -->
<hbox align="center" id="downloadsRetentionBox">
<description>&downloadsRetentionPolicy.label;</description>
</hbox>
</expander>
<!-- Cookies -->
@ -137,5 +141,15 @@
<label>&clearAllDescription.label;</label>
<button label="&clearAll.label;" oncommand="PrivacyPanel.clearAll();"/>
</hbox>
<menulist id="downloadsRetentionPolicy" hidden="true"
preftype="int" prefstring="browser.download.retention" prefdefval="0">
<menupopup>
<menuitem value="0" label="&downloadsRemoveImmediately.label;"/>
<menuitem value="1" label="&downloadsRemoveExit.label;"/>
<menuitem value="2" label="&downloadsRemoveManually.label;"/>
</menupopup>
</menulist>
</page>

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

@ -35,7 +35,11 @@
<!ENTITY clearFormfill.label "Clear">
<!ENTITY downloads.label "Download Manager History">
<!ENTITY downloadsDescription.label "The Download Manager keeps track of recently downloaded files. XXXben - blake, we need at the very least a toggle here, probably a retention window as well">
<!ENTITY downloadsDescription.label "The Download Manager keeps track of recently downloaded files. THESE OPTIONS DO NOT WORK YET.">
<!ENTITY downloadsRetentionPolicy.label "Remove files from the Download Manager:">
<!ENTITY downloadsRemoveImmediately.label "Upon successful download">
<!ENTITY downloadsRemoveExit.label "When Firebird exits">
<!ENTITY downloadsRemoveManually.label "Manually">
<!ENTITY clearDownloads.label "Clear">
<!ENTITY passwords.label "Saved Passwords">