mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 21:05:36 +00:00
Bug 579769 - Remove check attribute when customizing toolbars
r=dao a=beltzner
This commit is contained in:
parent
42d0f873ad
commit
7503c31e0f
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user