Disabled-state for menuitems with a command set is never updated. b=356080 r=mano sr=pinkerton

This commit is contained in:
joshmoz%gmail.com 2006-10-11 15:53:24 +00:00
Родитель b62907d2f3
Коммит 39136fb875
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -441,6 +441,12 @@ nsMenuItemX::AttributeChanged(nsIDocument *aDocument, PRInt32 aNameSpaceID, nsIC
nsCOMPtr<nsIMenuListener> listener = do_QueryInterface(mMenuParent);
listener->SetRebuild(PR_TRUE);
}
else if (aAttribute == nsWidgetAtoms::disabled) {
if (aContent->AttrValueIs(kNameSpaceID_None, nsWidgetAtoms::disabled, nsWidgetAtoms::_true, eCaseMatters))
[mNativeMenuItem setEnabled:NO];
else
[mNativeMenuItem setEnabled:YES];
}
}
else if (aContent == mCommandContent) {
// the only thing that really matters when the menu isn't showing is the