mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
remove menu listener usage from cocoa widget nsIWidgets. b=396820 r=cbarrett sr=roc a=roc
This commit is contained in:
parent
d8eb6e9eed
commit
89d68c33ee
@ -1335,13 +1335,10 @@ NS_IMETHODIMP nsChildView::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStat
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mMenuListener && event->eventStructType == NS_MENU_EVENT)
|
||||
aStatus = mMenuListener->MenuSelected(static_cast<nsMenuEvent&>(*event));
|
||||
|
||||
|
||||
if (mEventCallback)
|
||||
aStatus = (*mEventCallback)(event);
|
||||
|
||||
|
||||
// dispatch to event listener if event was not consumed
|
||||
if (mEventListener && aStatus != nsEventStatus_eConsumeNoDefault)
|
||||
aStatus = mEventListener->ProcessEvent(*event);
|
||||
|
@ -149,7 +149,6 @@ public:
|
||||
NS_IMETHOD Show(PRBool aState);
|
||||
NS_IMETHOD AddMouseListener(nsIMouseListener * aListener);
|
||||
NS_IMETHOD AddEventListener(nsIEventListener * aListener);
|
||||
NS_IMETHOD AddMenuListener(nsIMenuListener * aListener);
|
||||
NS_IMETHOD Enable(PRBool aState);
|
||||
NS_IMETHOD IsEnabled(PRBool *aState);
|
||||
NS_IMETHOD SetModal(PRBool aState);
|
||||
|
@ -652,17 +652,6 @@ NS_METHOD nsCocoaWindow::AddEventListener(nsIEventListener * aListener)
|
||||
}
|
||||
|
||||
|
||||
NS_METHOD nsCocoaWindow::AddMenuListener(nsIMenuListener * aListener)
|
||||
{
|
||||
nsBaseWidget::AddMenuListener(aListener);
|
||||
|
||||
if (mPopupContentView)
|
||||
mPopupContentView->AddMenuListener(aListener);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
NS_IMETHODIMP nsCocoaWindow::Enable(PRBool aState)
|
||||
{
|
||||
return NS_OK;
|
||||
@ -941,9 +930,6 @@ nsCocoaWindow::DispatchEvent(nsGUIEvent* event, nsEventStatus& aStatus)
|
||||
nsIWidget* aWidget = event->widget;
|
||||
NS_IF_ADDREF(aWidget);
|
||||
|
||||
if (mMenuListener && event->eventStructType == NS_MENU_EVENT)
|
||||
aStatus = mMenuListener->MenuSelected(static_cast<nsMenuEvent&>(*event));
|
||||
|
||||
if (mEventCallback)
|
||||
aStatus = (*mEventCallback)(event);
|
||||
|
||||
|
@ -358,8 +358,6 @@ nsMenuBarX::MenuConstruct(const nsMenuEvent & aMenuEvent, nsIWidget* aParentWind
|
||||
doc->AddMutationObserver(this);
|
||||
mDocument = doc;
|
||||
|
||||
aParentWindow->AddMenuListener((nsIMenuListener *)this);
|
||||
|
||||
PRUint32 count = mMenuBarContent->GetChildCount();
|
||||
for (PRUint32 i = 0; i < count; i++) {
|
||||
nsIContent *menu = mMenuBarContent->GetChildAt(i);
|
||||
|
Loading…
Reference in New Issue
Block a user