зеркало из https://github.com/mozilla/gecko-dev.git
Bug 471898 - In Tools > Options > Privacy: if sanitize on shutdown is off settings... button should be disabled. r=gavin
This commit is contained in:
Родитель
00ba5afbd6
Коммит
95d0a3d47d
|
@ -24,6 +24,7 @@
|
|||
# Ben Goodger <ben@mozilla.org>
|
||||
# Jeff Walden <jwalden+code@mit.edu>
|
||||
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||
# Roberto Estrada <roberto.estrada@yahoo.es>
|
||||
#
|
||||
# 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
|
||||
|
@ -49,6 +50,7 @@ var gPrivacyPane = {
|
|||
init: function ()
|
||||
{
|
||||
this._updateHistoryDaysUI();
|
||||
this._updateSanitizeSettingsButton();
|
||||
},
|
||||
|
||||
// HISTORY
|
||||
|
@ -315,6 +317,17 @@ var gPrivacyPane = {
|
|||
var glue = Cc["@mozilla.org/browser/browserglue;1"]
|
||||
.getService(Ci.nsIBrowserGlue);
|
||||
glue.sanitize(window || null);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Enables or disables the "Settings..." button depending
|
||||
* on the privacy.sanitize.sanitizeOnShutdown preference value
|
||||
*/
|
||||
_updateSanitizeSettingsButton: function () {
|
||||
var settingsButton = document.getElementById("clearDataSettings");
|
||||
var sanitizeOnShutdownPref = document.getElementById("privacy.sanitize.sanitizeOnShutdown");
|
||||
|
||||
settingsButton.disabled = !sanitizeOnShutdownPref.value;
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
# Ben Goodger <ben@mozilla.org>
|
||||
# Jeff Walden <jwalden+code@mit.edu>
|
||||
# Ehsan Akhgari <ehsan.akhgari@gmail.com>
|
||||
# Roberto Estrada <roberto.estrada@yahoo.es>
|
||||
#
|
||||
# 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
|
||||
|
@ -98,6 +99,7 @@
|
|||
<!-- Clear Private Data -->
|
||||
<preference id="privacy.sanitize.sanitizeOnShutdown"
|
||||
name="privacy.sanitize.sanitizeOnShutdown"
|
||||
onchange="gPrivacyPane._updateSanitizeSettingsButton();"
|
||||
type="bool"/>
|
||||
|
||||
</preferences>
|
||||
|
|
Загрузка…
Ссылка в новой задаче