From e1e1c25bb83c8d4f4b9b600bf0e49bbf5e60723d Mon Sep 17 00:00:00 2001 From: "steffen.wilberg%web.de" Date: Tue, 5 Oct 2004 10:45:58 +0000 Subject: [PATCH] Bug 255572: 'Restore Default' in customize toolbars window should restore display mode. r=ben@mozilla.org --- toolkit/content/customizeToolbar.js | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/toolkit/content/customizeToolbar.js b/toolkit/content/customizeToolbar.js index 22aa27f020fc..298fa7adc73d 100644 --- a/toolkit/content/customizeToolbar.js +++ b/toolkit/content/customizeToolbar.js @@ -22,7 +22,7 @@ # Joe Hewitt (hewitt@netscape.com) const kRowMax = 4; -const kWindowWidth = 600; +const kWindowWidth = 635; const kWindowHeight = 400; const kAnimateIncrement = 50; const kAnimateSteps = kWindowHeight / kAnimateIncrement - 1; @@ -554,6 +554,12 @@ function restoreDefaultSet() toolbar = toolbar.nextSibling; } + // Restore the default icon size (large) and mode (icons only). + updateIconSize(false); + document.getElementById("smallicons").checked = false; + updateToolbarMode("icons"); + document.getElementById("modelist").value = "icons"; + // Remove all of the customized toolbars. var child = gToolbox.lastChild; while (child) { @@ -608,14 +614,7 @@ function updateToolbarMode(aModeValue) } var iconSizeCheckbox = document.getElementById("smallicons"); - if (aModeValue == "text") { - iconSizeCheckbox.disabled = true; - iconSizeCheckbox.checked = false; - } - else { - iconSizeCheckbox.disabled = false; - iconSizeCheckbox.checked = gToolboxIconSize; - } + iconSizeCheckbox.disabled = aModeValue == "text"; repositionDialog(); }