Bug 345769 - Move "Ask me before clearing" checkbox from the CPD dialog to the prefwindow. r=mconnor
git-svn-id: svn://10.0.0.236/trunk@206623 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -96,22 +96,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
sanitizePasswords: function ()
|
||||
{
|
||||
var preference = document.getElementById("privacy.item.passwords");
|
||||
var promptPref = document.getElementById("privacy.sanitize.promptOnSanitize");
|
||||
if (preference.value)
|
||||
promptPref.value = true;
|
||||
promptPref.disabled = preference.value;
|
||||
|
||||
return this.onReadGeneric();
|
||||
},
|
||||
|
||||
onReadSanitizePasswords: function ()
|
||||
{
|
||||
return this.sanitizePasswords();
|
||||
},
|
||||
|
||||
onReadGeneric: function ()
|
||||
{
|
||||
var preferences = document.getElementById("sanitizePreferences");
|
||||
@@ -142,40 +126,37 @@
|
||||
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool" readonly="true"/>
|
||||
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool" readonly="true"/>
|
||||
</preferences>
|
||||
<preferences>
|
||||
<preference id="privacy.sanitize.promptOnSanitize" name="privacy.sanitize.promptOnSanitize" type="bool" instantApply="true"/>
|
||||
</preferences>
|
||||
|
||||
<groupbox orient="vertical" align="start">
|
||||
<caption label="&sanitizeItems.label;"/>
|
||||
|
||||
<checkbox label="&itemHistory.label;" accesskey="&itemHistory.accesskey;"
|
||||
preference="privacy.item.history"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemFormSearchHistory.label;" accesskey="&itemFormSearchHistory.accesskey;"
|
||||
preference="privacy.item.formdata"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemPasswords.label;" accesskey="&itemPasswords.accesskey;"
|
||||
preference="privacy.item.passwords"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadSanitizePasswords();"/>
|
||||
<checkbox label="&itemDownloads.label;" accesskey="&itemDownloads.accesskey;"
|
||||
preference="privacy.item.downloads"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemCookies.label;" accesskey="&itemCookies.accesskey;"
|
||||
preference="privacy.item.cookies"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemCache.label;" accesskey="&itemCache.accesskey;"
|
||||
preference="privacy.item.cache"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemSessions.label;" accesskey="&itemSessions.accesskey;"
|
||||
preference="privacy.item.sessions"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox orient="vertical" align="start">
|
||||
<checkbox id="promptOnSanitize" label="&promptOnSanitize.label;"
|
||||
accesskey="&promptOnSanitize.accesskey;"
|
||||
preference="privacy.sanitize.promptOnSanitize"/>
|
||||
</groupbox>
|
||||
<description>&sanitizeItems.label;</description>
|
||||
|
||||
<checkbox label="&itemHistory.label;"
|
||||
accesskey="&itemHistory.accesskey;"
|
||||
preference="privacy.item.history"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemDownloads.label;"
|
||||
accesskey="&itemDownloads.accesskey;"
|
||||
preference="privacy.item.downloads"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemFormSearchHistory.label;"
|
||||
accesskey="&itemFormSearchHistory.accesskey;"
|
||||
preference="privacy.item.formdata"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemCache.label;"
|
||||
accesskey="&itemCache.accesskey;"
|
||||
preference="privacy.item.cache"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemCookies.label;"
|
||||
accesskey="&itemCookies.accesskey;"
|
||||
preference="privacy.item.cookies"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemPasswords.label;"
|
||||
accesskey="&itemPasswords.accesskey;"
|
||||
preference="privacy.item.passwords"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
<checkbox label="&itemSessions.label;"
|
||||
accesskey="&itemSessions.accesskey;"
|
||||
preference="privacy.item.sessions"
|
||||
onsyncfrompreference="return gSanitizePromptDialog.onReadGeneric();"/>
|
||||
|
||||
</prefpane>
|
||||
</prefwindow>
|
||||
|
||||
@@ -29,7 +29,6 @@ browser.jar:
|
||||
* content/browser/preferences/privacy.xul
|
||||
* content/browser/preferences/privacy.js
|
||||
* content/browser/preferences/sanitize.xul
|
||||
* content/browser/preferences/sanitize.js
|
||||
* content/browser/preferences/security.xul
|
||||
* content/browser/preferences/security.js
|
||||
* content/browser/preferences/securityWarnings.xul
|
||||
|
||||
@@ -239,14 +239,14 @@ var gPrivacyPane = {
|
||||
|
||||
/**
|
||||
* Sets the label of the "Clear Now..." button according to the
|
||||
* privacy.sanitize.promptOnSanitize pref.
|
||||
* privacy.sanitize.promptOnSanitize preference.
|
||||
*/
|
||||
updateClearNowButtonLabel: function ()
|
||||
{
|
||||
var prefBranch = Components.classes["@mozilla.org/preferences-service;1"]
|
||||
.getService(Components.interfaces.nsIPrefBranch);
|
||||
var pref = document.getElementById("privacy.sanitize.promptOnSanitize");
|
||||
var clearNowButton = document.getElementById("clearDataNow");
|
||||
if (prefBranch.getBoolPref("privacy.sanitize.promptOnSanitize"))
|
||||
|
||||
if (pref.value)
|
||||
clearNowButton.label = clearNowButton.getAttribute("label1"); // "Clear Now..."
|
||||
else
|
||||
clearNowButton.label = clearNowButton.getAttribute("label2"); // "Clear Now"
|
||||
|
||||
@@ -82,7 +82,13 @@
|
||||
<preference id="network.cookie.blockFutureCookies" name="network.cookie.blockFutureCookies" type="bool"/>
|
||||
|
||||
<!-- Clear Private Data -->
|
||||
<preference id="privacy.sanitize.sanitizeOnShutdown" name="privacy.sanitize.sanitizeOnShutdown" type="bool"/>
|
||||
<preference id="privacy.sanitize.sanitizeOnShutdown"
|
||||
name="privacy.sanitize.sanitizeOnShutdown"
|
||||
type="bool"/>
|
||||
<preference id="privacy.sanitize.promptOnSanitize"
|
||||
name="privacy.sanitize.promptOnSanitize"
|
||||
type="bool"
|
||||
onchange="gPrivacyPane.updateClearNowButtonLabel();"/>
|
||||
|
||||
</preferences>
|
||||
|
||||
@@ -168,7 +174,11 @@
|
||||
accesskey="&clearDataSettings.accesskey;"
|
||||
oncommand="gPrivacyPane.showClearPrivateDataSettings();"/>
|
||||
</hbox>
|
||||
<hbox align="right">
|
||||
<hbox id="askClearBox">
|
||||
<checkbox id="askBeforeClear" flex="1"
|
||||
preference="privacy.sanitize.promptOnSanitize"
|
||||
label="&askBeforeClear.label;"
|
||||
accesskey="&askBeforeClear.accesskey;"/>
|
||||
<button id="clearDataNow"
|
||||
label1="&clearDataNow.label;"
|
||||
label2="&clearDataNow.label2;"
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
# -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
||||
# ***** 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 the Firefox Preferences System.
|
||||
#
|
||||
# The Initial Developer of the Original Code is
|
||||
# Ben Goodger.
|
||||
# Portions created by the Initial Developer are Copyright (C) 2005
|
||||
# the Initial Developer. All Rights Reserved.
|
||||
#
|
||||
# Contributor(s):
|
||||
# Ben Goodger <ben@mozilla.org>
|
||||
#
|
||||
# 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 gSanitizeDialog = {
|
||||
sanitizePasswords: function ()
|
||||
{
|
||||
var preference = document.getElementById("privacy.item.passwords");
|
||||
var promptPref = document.getElementById("privacy.sanitize.promptOnSanitize");
|
||||
if (preference.value)
|
||||
promptPref.value = true;
|
||||
promptPref.disabled = preference.value;
|
||||
return undefined;
|
||||
},
|
||||
|
||||
onReadSanitizePasswords: function ()
|
||||
{
|
||||
this.sanitizePasswords();
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -50,45 +50,45 @@
|
||||
<prefwindow id="SanitizeDialog" type="child"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
dlgbuttons="accept,cancel,help"
|
||||
title="&sanitizeDialog.title;"
|
||||
style="width: &window.width; !important;">
|
||||
title="&sanitizeDialog.title;"><!--
|
||||
style="width: &window.width; !important;"-->
|
||||
|
||||
<prefpane id="SanitizeDialogPane"
|
||||
helpTopic="prefs-clear-private-data" helpURI="chrome://browser/locale/help/help.rdf">
|
||||
<script type="application/x-javascript" src="chrome://browser/content/preferences/sanitize.js"/>
|
||||
|
||||
<preferences>
|
||||
<preference id="privacy.item.history" name="privacy.item.history" type="bool"/>
|
||||
<preference id="privacy.item.formdata" name="privacy.item.formdata" type="bool"/>
|
||||
<preference id="privacy.item.passwords" name="privacy.item.passwords" type="bool" onchange="gSanitizeDialog.sanitizePasswords();"/>
|
||||
<preference id="privacy.item.passwords" name="privacy.item.passwords" type="bool"/>
|
||||
<preference id="privacy.item.downloads" name="privacy.item.downloads" type="bool"/>
|
||||
<preference id="privacy.item.cookies" name="privacy.item.cookies" type="bool"/>
|
||||
<preference id="privacy.item.cache" name="privacy.item.cache" type="bool"/>
|
||||
<preference id="privacy.item.sessions" name="privacy.item.sessions" type="bool"/>
|
||||
|
||||
<preference id="privacy.sanitize.promptOnSanitize" name="privacy.sanitize.promptOnSanitize" type="bool"/>
|
||||
</preferences>
|
||||
|
||||
<groupbox id="sanitizeItems" orient="vertical" align="start">
|
||||
<caption label="&items.label;"/>
|
||||
|
||||
<description control="sanitizeItems">&sanitizeItems.label;</description>
|
||||
<checkbox label="&itemHistory.label;" accesskey="&itemHistory.accesskey;" preference="privacy.item.history"/>
|
||||
<checkbox label="&itemFormData.label;" accesskey="&itemFormData.accesskey;" preference="privacy.item.formdata"/>
|
||||
<checkbox label="&itemPasswords.label;" accesskey="&itemPasswords.accesskey;" preference="privacy.item.passwords"
|
||||
onsyncfrompreference="return gSanitizeDialog.onReadSanitizePasswords();"/>
|
||||
<checkbox label="&itemDownloads.label;" accesskey="&itemDownloads.accesskey;" preference="privacy.item.downloads"/>
|
||||
<checkbox label="&itemCookies.label;" accesskey="&itemCookies.accesskey;" preference="privacy.item.cookies"/>
|
||||
<checkbox label="&itemCache.label;" accesskey="&itemCache.accesskey;" preference="privacy.item.cache"/>
|
||||
<checkbox label="&itemSessions.label;" accesskey="&itemSessions.accesskey;" preference="privacy.item.sessions"/>
|
||||
</groupbox>
|
||||
|
||||
<groupbox orient="vertical" align="start">
|
||||
<caption label="&settings.label;"/>
|
||||
<!-- XXX remove groupbox? -->
|
||||
<checkbox id="promptOnSanitize" label="&promptOnSanitize.label;"
|
||||
accesskey="&promptOnSanitize.accesskey;"
|
||||
preference="privacy.sanitize.promptOnSanitize"/>
|
||||
</groupbox>
|
||||
<description>&clearDataSettings.label;</description>
|
||||
|
||||
<checkbox label="&itemHistory.label;"
|
||||
accesskey="&itemHistory.accesskey;"
|
||||
preference="privacy.item.history"/>
|
||||
<checkbox label="&itemDownloads.label;"
|
||||
accesskey="&itemDownloads.accesskey;"
|
||||
preference="privacy.item.downloads"/>
|
||||
<checkbox label="&itemFormData.label;"
|
||||
accesskey="&itemFormData.accesskey;"
|
||||
preference="privacy.item.formdata"/>
|
||||
<checkbox label="&itemCache.label;"
|
||||
accesskey="&itemCache.accesskey;"
|
||||
preference="privacy.item.cache"/>
|
||||
<checkbox label="&itemCookies.label;"
|
||||
accesskey="&itemCookies.accesskey;"
|
||||
preference="privacy.item.cookies"/>
|
||||
<checkbox label="&itemPasswords.label;"
|
||||
accesskey="&itemPasswords.accesskey;"
|
||||
preference="privacy.item.passwords"/>
|
||||
<checkbox label="&itemSessions.label;"
|
||||
accesskey="&itemSessions.accesskey;"
|
||||
preference="privacy.item.sessions"/>
|
||||
|
||||
</prefpane>
|
||||
</prefwindow>
|
||||
|
||||
@@ -41,6 +41,9 @@
|
||||
<!ENTITY alwaysClear.label "Always clear my private data when I close &brandShortName;">
|
||||
<!ENTITY alwaysClear.accesskey "w">
|
||||
|
||||
<!ENTITY askBeforeClear.label "Ask me before clearing private data">
|
||||
<!ENTITY askBeforeClear.accesskey "A">
|
||||
|
||||
<!ENTITY clearDataSettings.label "Settings...">
|
||||
<!ENTITY clearDataSettings.accesskey "t">
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<!ENTITY sanitizeDialog.title "Clear Private Data">
|
||||
<!ENTITY window.width "30em">
|
||||
|
||||
<!ENTITY items.label "Private Data">
|
||||
<!ENTITY sanitizeItems.label "Select the items to be cleared:">
|
||||
<!ENTITY clearDataSettings.label "When I ask &brandShortName; to clear my private data, it should erase:">
|
||||
|
||||
<!-- XXX rearrange entities to match physical layout when l10n isn't an issue -->
|
||||
|
||||
<!ENTITY itemHistory.label "Browsing History">
|
||||
<!ENTITY itemHistory.accesskey "B">
|
||||
<!ENTITY itemFormData.label "Saved Form Information">
|
||||
@@ -17,10 +18,3 @@
|
||||
<!ENTITY itemDownloads.accesskey "D">
|
||||
<!ENTITY itemSessions.label "Authenticated Sessions">
|
||||
<!ENTITY itemSessions.accesskey "S">
|
||||
|
||||
<!ENTITY settings.label "Settings">
|
||||
<!ENTITY sanitizeOnShutDown.label "Clear private data when closing &brandShortName;">
|
||||
<!ENTITY sanitizeOnShutDown.accesskey "e">
|
||||
<!ENTITY promptOnSanitize.label "Ask me before clearing private data">
|
||||
<!ENTITY promptOnSanitize.accesskey "k">
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
<!ENTITY sanitizeDialog.title "Clear Private Data">
|
||||
|
||||
<!ENTITY sanitizeItems.label "Clear the following items now:">
|
||||
|
||||
<!-- XXX rearrange entities to match physical layout when l10n isn't an issue -->
|
||||
|
||||
<!ENTITY itemHistory.label "Browsing History">
|
||||
<!ENTITY itemHistory.accesskey "B">
|
||||
<!ENTITY itemFormSearchHistory.label "Saved Form and Search History">
|
||||
@@ -15,6 +18,3 @@
|
||||
<!ENTITY itemDownloads.accesskey "D">
|
||||
<!ENTITY itemSessions.label "Authenticated Sessions">
|
||||
<!ENTITY itemSessions.accesskey "S">
|
||||
|
||||
<!ENTITY promptOnSanitize.label "Ask me before clearing private data">
|
||||
<!ENTITY promptOnSanitize.accesskey "k">
|
||||
|
||||
Reference in New Issue
Block a user