GetMenuBar() now traverses up the hierarchy so it no longer has to be done here.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -657,13 +657,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
|||||||
|
|
||||||
// Is this menu on a menubar? (possibly nested)
|
// Is this menu on a menubar? (possibly nested)
|
||||||
wxFrame* frame = NULL;
|
wxFrame* frame = NULL;
|
||||||
wxMenu* pm = menu;
|
if(menu->IsAttached())
|
||||||
while ( pm && !frame )
|
frame = menu->GetMenuBar()->GetFrame();
|
||||||
{
|
|
||||||
if ( pm->IsAttached() )
|
|
||||||
frame = pm->GetMenuBar()->GetFrame();
|
|
||||||
pm = pm->GetParent();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: why do we have to call wxFrame::GetEventHandler() directly here?
|
// FIXME: why do we have to call wxFrame::GetEventHandler() directly here?
|
||||||
// normally wxMenu::SendEvent() should be enough, if it doesn't work
|
// normally wxMenu::SendEvent() should be enough, if it doesn't work
|
||||||
|
@@ -657,13 +657,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
|
|||||||
|
|
||||||
// Is this menu on a menubar? (possibly nested)
|
// Is this menu on a menubar? (possibly nested)
|
||||||
wxFrame* frame = NULL;
|
wxFrame* frame = NULL;
|
||||||
wxMenu* pm = menu;
|
if(menu->IsAttached())
|
||||||
while ( pm && !frame )
|
frame = menu->GetMenuBar()->GetFrame();
|
||||||
{
|
|
||||||
if ( pm->IsAttached() )
|
|
||||||
frame = pm->GetMenuBar()->GetFrame();
|
|
||||||
pm = pm->GetParent();
|
|
||||||
}
|
|
||||||
|
|
||||||
// FIXME: why do we have to call wxFrame::GetEventHandler() directly here?
|
// FIXME: why do we have to call wxFrame::GetEventHandler() directly here?
|
||||||
// normally wxMenu::SendEvent() should be enough, if it doesn't work
|
// normally wxMenu::SendEvent() should be enough, if it doesn't work
|
||||||
|
Reference in New Issue
Block a user