mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
allow changing of the label of a submenu. r=saari/sr=smfr/a=asa. bug# 97549.
This commit is contained in:
parent
42a25f889c
commit
67221e8f7e
@ -1484,8 +1484,14 @@ nsMenu::AttributeChanged(nsIDocument *aDocument, PRInt32 aNameSpaceID, nsIAtom *
|
||||
|
||||
mMenuContent->GetAttr(kNameSpaceID_None, nsWidgetAtoms::label, mLabel);
|
||||
|
||||
if((mMacMenuID <= 5) && (mMacMenuID >= 2))
|
||||
// if we're a submenu, we don't have to go through all the gymnastics below
|
||||
// to remove ourselves from the menubar and re-add the menu. We just invalidate
|
||||
// our parent to change the text of the item.
|
||||
if((mMacMenuID <= 5) && (mMacMenuID >= 2)) {
|
||||
nsCOMPtr<nsIMenuListener> listener = do_QueryInterface(mParent);
|
||||
listener->SetRebuild(PR_TRUE);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
::DeleteMenu(mMacMenuID);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user