зеркало из 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)
|
NS_IMETHODIMP nsMenuX::RemoveItem(const PRUint32 aPos)
|
||||||
{
|
{
|
||||||
if (mMacMenu != NULL) {
|
NS_WARNING("Not implemented");
|
||||||
// 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);
|
|
||||||
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче