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:
David Elliott
2004-03-30 00:56:09 +00:00
parent dbdf9a176f
commit 6edf110703
2 changed files with 4 additions and 14 deletions

View File

@@ -657,13 +657,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
// Is this menu on a menubar? (possibly nested)
wxFrame* frame = NULL;
wxMenu* pm = menu;
while ( pm && !frame )
{
if ( pm->IsAttached() )
frame = pm->GetMenuBar()->GetFrame();
pm = pm->GetParent();
}
if(menu->IsAttached())
frame = menu->GetMenuBar()->GetFrame();
// FIXME: why do we have to call wxFrame::GetEventHandler() directly here?
// normally wxMenu::SendEvent() should be enough, if it doesn't work

View File

@@ -657,13 +657,8 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu )
// Is this menu on a menubar? (possibly nested)
wxFrame* frame = NULL;
wxMenu* pm = menu;
while ( pm && !frame )
{
if ( pm->IsAttached() )
frame = pm->GetMenuBar()->GetFrame();
pm = pm->GetParent();
}
if(menu->IsAttached())
frame = menu->GetMenuBar()->GetFrame();
// FIXME: why do we have to call wxFrame::GetEventHandler() directly here?
// normally wxMenu::SendEvent() should be enough, if it doesn't work