283601 - cache button remains enabled after clicking. (make it reenable after 10 seconds). also, remove some spurious dumps

This commit is contained in:
ben%bengoodger.com 2005-02-27 00:41:40 +00:00
parent aa842d85cb
commit 5e7e0b22bd
2 changed files with 4 additions and 3 deletions

View File

@ -50,13 +50,11 @@ Sanitizer.prototype = {
_prefDomain: "privacy.item.",
getNameFromPreference: function (aPreferenceName)
{
dump("*** " + aPreferenceName + ", i = " + this._prefDomain.length + ", sub = " + aPreferenceName.substr(this._prefDomain.length, -1) + "\n");
return aPreferenceName.substr(this._prefDomain.length);
},
sanitize: function ()
{
dump("*** sanitizing!\n");
var psvc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
var branch = psvc.getBranch(this._prefDomain);

View File

@ -149,7 +149,10 @@ var gPrivacyPane = {
{
var category = aButton.getAttribute("item");
this._sanitizer.clearItem(category);
aButton.disabled = !this._sanitizer.canClearItem(category);
if (category == "cache")
aButton.disabled = true;
else
aButton.disabled = !this._sanitizer.canClearItem(category);
if (this._updateInterval == -1)
this._updateInterval = setInterval("gPrivacyPane._updateClearButtons()", 10000);
},