diff --git a/suite/common/pref/pref-smart_browsing.js b/suite/common/pref/pref-smart_browsing.js index 1c0c7384d83c..43a045fbaae7 100644 --- a/suite/common/pref/pref-smart_browsing.js +++ b/suite/common/pref/pref-smart_browsing.js @@ -75,6 +75,7 @@ function removeDomain() } selectFirstCell(); rebuildPrefValue(); + toggleRemoveButton(); } function rebuildPrefValue() @@ -126,9 +127,20 @@ function doButtonEnabling() if (parent.hPrefWindow.getPrefIsLocked(addDomain.getAttribute("prefstring"))) addDomain.disabled = true; + toggleRemoveButton(); toggleAutoCompleteAdvancedButton(); } +function toggleRemoveButton() +{ + var domains = document.getElementById("disabledKids"); + var removeButton = document.getElementById("removeDomain"); + if (domains.childNodes.length == 0) + removeButton.disabled = true; + else + removeButton.disabled = false; +} + function moreInfo() { var browserURL = null; diff --git a/suite/common/pref/pref-smart_browsing.xul b/suite/common/pref/pref-smart_browsing.xul index 46abd2efc956..c0ca89d3bf4f 100644 --- a/suite/common/pref/pref-smart_browsing.xul +++ b/suite/common/pref/pref-smart_browsing.xul @@ -83,7 +83,8 @@ -