From 50bbdb18e89876bb0cb90f271febe47c917decf9 Mon Sep 17 00:00:00 2001 From: "jwalden%mit.edu" Date: Fri, 4 Aug 2006 21:35:18 +0000 Subject: [PATCH] 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 --- mozilla/browser/base/content/sanitize.xul | 81 +++++++------------ mozilla/browser/components/preferences/jar.mn | 1 - .../browser/components/preferences/privacy.js | 8 +- .../components/preferences/privacy.xul | 14 +++- .../components/preferences/sanitize.js | 56 ------------- .../components/preferences/sanitize.xul | 54 ++++++------- .../chrome/browser/preferences/privacy.dtd | 3 + .../chrome/browser/preferences/sanitize.dtd | 14 +--- .../locales/en-US/chrome/browser/sanitize.dtd | 6 +- 9 files changed, 84 insertions(+), 153 deletions(-) delete mode 100644 mozilla/browser/components/preferences/sanitize.js diff --git a/mozilla/browser/base/content/sanitize.xul b/mozilla/browser/base/content/sanitize.xul index 46c46f34d8f..eee014480d3 100644 --- a/mozilla/browser/base/content/sanitize.xul +++ b/mozilla/browser/base/content/sanitize.xul @@ -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 @@ - - - - - - - - - - - - - - - - - - + &sanitizeItems.label; + + + + + + + + + diff --git a/mozilla/browser/components/preferences/jar.mn b/mozilla/browser/components/preferences/jar.mn index 72ad84a7ba3..e7a9c4909f8 100644 --- a/mozilla/browser/components/preferences/jar.mn +++ b/mozilla/browser/components/preferences/jar.mn @@ -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 diff --git a/mozilla/browser/components/preferences/privacy.js b/mozilla/browser/components/preferences/privacy.js index d04c8302735..0553db67e79 100644 --- a/mozilla/browser/components/preferences/privacy.js +++ b/mozilla/browser/components/preferences/privacy.js @@ -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" diff --git a/mozilla/browser/components/preferences/privacy.xul b/mozilla/browser/components/preferences/privacy.xul index 186a44381ec..7dbb4aac599 100644 --- a/mozilla/browser/components/preferences/privacy.xul +++ b/mozilla/browser/components/preferences/privacy.xul @@ -82,7 +82,13 @@ - + + @@ -168,7 +174,11 @@ accesskey="&clearDataSettings.accesskey;" oncommand="gPrivacyPane.showClearPrivateDataSettings();"/> - + +