diff --git a/mail/base/content/customizeToolbar.js b/mail/base/content/customizeToolbar.js index edb06321f41..a0521dce613 100644 --- a/mail/base/content/customizeToolbar.js +++ b/mail/base/content/customizeToolbar.js @@ -58,37 +58,37 @@ function onUnload(aEvent) notifyParentComplete(); } - -function onCancel() -{ - // restore the saved toolbarset for each customizeable toolbar - - // Restore the defaultset for fixed toolbars. - var toolbar = gToolbox.firstChild; - while (toolbar) { - if (isCustomizableToolbar(toolbar)) { - if (!toolbar.hasAttribute("customindex")) { - var previousset = toolbar.getAttribute("previousset"); - if (previousset) - { - toolbar.currentSet = previousset; - } - } - } - toolbar = toolbar.nextSibling; - } - - // Now rebuild the palette. - buildPalette(); - - // Now re-wrap the items on the toolbar. - wrapToolbarItems(); - - repositionDialog(); - gToolboxChanged = true; - - return onAccept(); // we restored the default toolbar, act like a normal accept event now -} + +function onCancel() +{ + // restore the saved toolbarset for each customizeable toolbar + + // Restore the defaultset for fixed toolbars. + var toolbar = gToolbox.firstChild; + while (toolbar) { + if (isCustomizableToolbar(toolbar)) { + if (!toolbar.hasAttribute("customindex")) { + var previousset = toolbar.getAttribute("previousset"); + if (previousset) + { + toolbar.currentSet = previousset; + } + } + } + toolbar = toolbar.nextSibling; + } + + // Now rebuild the palette. + buildPalette(); + + // Now re-wrap the items on the toolbar. + wrapToolbarItems(); + + repositionDialog(); + gToolboxChanged = true; + + return onAccept(); // we restored the default toolbar, act like a normal accept event now +} function onAccept(aEvent) { @@ -220,9 +220,9 @@ function wrapToolbarItems() { for (var i = 0; i < gToolbox.childNodes.length; ++i) { var toolbar = getToolbarAt(i); - if (isCustomizableToolbar(toolbar)) { - // save off the current set for each toolbar in case the user hits cancel - toolbar.setAttribute('previousset', toolbar.currentSet); + if (isCustomizableToolbar(toolbar)) { + // save off the current set for each toolbar in case the user hits cancel + toolbar.setAttribute('previousset', toolbar.currentSet); for (var k = 0; k < toolbar.childNodes.length; ++k) { var item = toolbar.childNodes[k]; @@ -247,7 +247,7 @@ function wrapToolbarItems() { for (var i = 0; i < gToolbox.childNodes.length; ++i) { var toolbar = getToolbarAt(i); - if (isCustomizableToolbar(toolbar)) { + if (isCustomizableToolbar(toolbar)) { toolbar.removeAttribute('previousset'); // remove previous set attribute for (var k = 0; k < toolbar.childNodes.length; ++k) { var paletteItem = toolbar.childNodes[k]; diff --git a/mail/base/content/customizeToolbar.xul b/mail/base/content/customizeToolbar.xul index bd3abcc7c78..e8c99a8b211 100644 --- a/mail/base/content/customizeToolbar.xul +++ b/mail/base/content/customizeToolbar.xul @@ -34,18 +34,18 @@ - -#ifndef XP_MACOSX - @@ -80,16 +80,16 @@ -#else - +#ifndef XP_MACOSX + +#else + #endif