Bug 847627 (part 2) - Unify Browsing and Download history entries in shutdown Sanitize dialog.

r=gavin
This commit is contained in:
Marco Bonardo 2013-03-20 18:07:05 +01:00
Родитель 01a27f96c1
Коммит 09b1f8f989
4 изменённых файлов: 16 добавлений и 37 удалений

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

@ -26,7 +26,7 @@
dlgbuttons="accept,cancel"
title="&sanitizeDialog2.title;"
noneverythingtitle="&sanitizeDialog2.title;"
style="width: &dialog.width;;"
style="width: &dialog.width2;;"
ondialogaccept="gSanitizePromptDialog.sanitize();">
<prefpane id="SanitizeDialogPane" onpaneload="gSanitizePromptDialog.init();">

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

@ -3,23 +3,8 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
XPCOMUtils.defineLazyModuleGetter(this, "DownloadsCommon",
"resource:///modules/DownloadsCommon.jsm");
let gSanitizeDialog = Object.freeze({
/**
* Sets up the UI.
*/
init: function ()
{
let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
downloadsPref.disabled = !DownloadsCommon.useToolkitUI;
this.onClearHistoryChanged();
},
onClearHistoryChanged: function () {
if (DownloadsCommon.useToolkitUI)
return;
let downloadsPref = document.getElementById("privacy.clearOnShutdown.downloads");
let historyPref = document.getElementById("privacy.clearOnShutdown.history");
downloadsPref.value = historyPref.value;

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

@ -19,9 +19,9 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
dlgbuttons="accept,cancel,help"
ondialoghelp="openPrefsHelp()"
style="width: &dialog.width;;"
style="width: &dialog.width2;;"
title="&sanitizePrefs2.title;"
onload="gSanitizeDialog.init();">
onload="gSanitizeDialog.onClearHistoryChanged();">
<script type="application/javascript" src="chrome://browser/content/utilityOverlay.js"/>
<script type="application/javascript" src="chrome://browser/content/preferences/sanitize.js"/>
@ -48,33 +48,30 @@
<caption label="&historySection.label;"/>
<grid flex="1">
<columns>
<column style="width: &column.width;"/>
<column style="width: &column.width2;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<checkbox label="&itemBrowsingHistory.label;"
accesskey="&itemBrowsingHistory.accesskey;"
<checkbox label="&itemHistoryAndDownloads.label;"
accesskey="&itemHistoryAndDownloads.accesskey;"
preference="privacy.clearOnShutdown.history"/>
<checkbox label="&itemCookies.label;"
accesskey="&itemCookies.accesskey;"
preference="privacy.clearOnShutdown.cookies"/>
</row>
<row>
<checkbox label="&itemDownloadHistory.label;"
accesskey="&itemDownloadHistory.accesskey;"
preference="privacy.clearOnShutdown.downloads"/>
<checkbox label="&itemActiveLogins.label;"
accesskey="&itemActiveLogins.accesskey;"
preference="privacy.clearOnShutdown.sessions"/>
<checkbox label="&itemCache.label;"
accesskey="&itemCache.accesskey;"
preference="privacy.clearOnShutdown.cache"/>
</row>
<row>
<checkbox label="&itemFormSearchHistory.label;"
accesskey="&itemFormSearchHistory.accesskey;"
preference="privacy.clearOnShutdown.formdata"/>
<checkbox label="&itemCache.label;"
accesskey="&itemCache.accesskey;"
preference="privacy.clearOnShutdown.cache"/>
</row>
</rows>
</grid>
@ -83,7 +80,7 @@
<caption label="&dataSection.label;"/>
<grid flex="1">
<columns>
<column style="width: &column.width;"/>
<column style="width: &column.width2;"/>
<column flex="1"/>
</columns>
<rows>

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

@ -32,13 +32,8 @@ that require it. -->
<!ENTITY historySection.label "History">
<!ENTITY dataSection.label "Data">
<!-- LOCALIZATION NOTE (item*): itemHistoryAndDownloads.* and
itemBrowsingHistory.* will never be used at the same time, so they can
have the same accesskey. -->
<!ENTITY itemHistoryAndDownloads.label "Browsing &amp; Download History">
<!ENTITY itemHistoryAndDownloads.accesskey "B">
<!ENTITY itemBrowsingHistory.label "Browsing History">
<!ENTITY itemBrowsingHistory.accesskey "B">
<!ENTITY itemFormSearchHistory.label "Form &amp; Search History">
<!ENTITY itemFormSearchHistory.accesskey "F">
<!ENTITY itemPasswords.label "Saved Passwords">
@ -49,8 +44,6 @@ that require it. -->
<!ENTITY itemCache.accesskey "A">
<!ENTITY itemOfflineApps.label "Offline Website Data">
<!ENTITY itemOfflineApps.accesskey "O">
<!ENTITY itemDownloadHistory.label "Download History">
<!ENTITY itemDownloadHistory.accesskey "D">
<!ENTITY itemActiveLogins.label "Active Logins">
<!ENTITY itemActiveLogins.accesskey "L">
<!ENTITY itemSitePreferences.label "Site Preferences">
@ -61,5 +54,9 @@ that require it. -->
mockup at bug 480169 -->
<!ENTITY sanitizeEverythingUndoWarning "This action cannot be undone.">
<!ENTITY dialog.width "28em">
<!ENTITY column.width "14em">
<!-- LOCALIZATION NOTE (dialog.width2): width of the Clear Recent History and
Clear History on Shutdown dialogs. Should be large enough to contain
the item* strings above on a single line. The column width should be set
at half of the dialog width. -->
<!ENTITY dialog.width2 "34em">
<!ENTITY column.width2 "17em">