зеркало из https://github.com/mozilla/gecko-dev.git
Turns out we shouldn't implement nsMenuX::RemoveItem. Carbon widgets don't implement it either. This fixes a major crash in Cocoa menus. no bug.
This commit is contained in:
Родитель
ddd30f420b
Коммит
ec495706a5
|
@ -309,18 +309,7 @@ NS_IMETHODIMP nsMenuX::InsertItemAt(const PRUint32 aPos, nsISupports * aMenuItem
|
|||
|
||||
NS_IMETHODIMP nsMenuX::RemoveItem(const PRUint32 aPos)
|
||||
{
|
||||
if (mMacMenu != NULL) {
|
||||
// clear command id
|
||||
nsCOMPtr<nsIMenuCommandDispatcher> dispatcher(do_QueryInterface(mManager));
|
||||
if (dispatcher) {
|
||||
dispatcher->Unregister((PRUint32)[[mMacMenu itemAtIndex:aPos] tag]);
|
||||
}
|
||||
// get rid of Cocoa menu item
|
||||
[mMacMenu removeItemAtIndex:aPos];
|
||||
}
|
||||
// get rid of Gecko menu items
|
||||
mMenuItemsArray.RemoveObjectAt(aPos);
|
||||
|
||||
NS_WARNING("Not implemented");
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче