Bug 537171 - defaulting navigation toolbar results in strange back/forward button types. r=neil

This commit is contained in:
Dão Gottwald 2009-12-31 13:48:16 +01:00
parent 4208e5fcb6
commit 706e52880b

View File

@ -648,11 +648,11 @@ function restoreDefaultSet()
}
function updateIconSize(aSize) {
return updateToolboxProperty("iconsize", aSize);
return updateToolboxProperty("iconsize", aSize, "large");
}
function updateToolbarMode(aModeValue) {
var mode = updateToolboxProperty("mode", aModeValue);
var mode = updateToolboxProperty("mode", aModeValue, "icons");
var iconSizeCheckbox = document.getElementById("smallicons");
iconSizeCheckbox.disabled = mode == "text";
@ -660,8 +660,9 @@ function updateToolbarMode(aModeValue) {
return mode;
}
function updateToolboxProperty(aProp, aValue) {
var toolboxDefault = gToolbox.getAttribute("default" + aProp);
function updateToolboxProperty(aProp, aValue, aToolkitDefault) {
var toolboxDefault = gToolbox.getAttribute("default" + aProp) ||
aToolkitDefault;
gToolbox.setAttribute(aProp, aValue || toolboxDefault);
gToolboxDocument.persist(gToolbox.id, aProp);
@ -680,7 +681,7 @@ function updateToolboxProperty(aProp, aValue) {
gToolboxDocument.persist(toolbar.id, aProp);
});
return aValue;
return aValue || toolboxDefault;
}
function isCustomizableToolbar(aElt)