Bug 579769 - Remove check attribute when customizing toolbars

r=dao a=beltzner
This commit is contained in:
Ian Neal 2010-07-21 22:26:22 +01:00
parent 42d0f873ad
commit 7503c31e0f

View File

@ -243,6 +243,9 @@ function unwrapToolbarItems()
if (paletteItem.hasAttribute("itemdisabled"))
toolbarItem.disabled = true;
if (paletteItem.hasAttribute("itemchecked"))
toolbarItem.checked = true;
if (paletteItem.hasAttribute("itemcommand")) {
let commandID = paletteItem.getAttribute("itemcommand");
toolbarItem.setAttribute("command", commandID);
@ -491,6 +494,11 @@ function cleanupItemForToolbar(aItem, aWrapper)
aItem.removeAttribute("command");
}
if (aItem.checked) {
aWrapper.setAttribute("itemchecked", "true");
aItem.checked = false;
}
if (aItem.disabled) {
aWrapper.setAttribute("itemdisabled", "true");
aItem.disabled = false;