call wxMenubarSetInvokingWindow for submenus appended during run-time

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6705 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2000-03-14 18:28:19 +00:00
parent eeb75ae603
commit e72007907a
2 changed files with 12 additions and 0 deletions

View File

@ -872,6 +872,12 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
#endif // GTK 1.2/1.0 #endif // GTK 1.2/1.0
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu ); gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu );
// if adding a submenu to a menu already existing in the menu bar, we
// must set invoking window to allow processing events from this
// submenu
if ( m_invokingWindow )
wxMenubarSetInvokingWindow(mitem->GetSubMenu(), m_invokingWindow);
} }
else // a normal item else // a normal item
{ {

View File

@ -872,6 +872,12 @@ bool wxMenu::GtkAppend(wxMenuItem *mitem)
#endif // GTK 1.2/1.0 #endif // GTK 1.2/1.0
gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu ); gtk_menu_item_set_submenu( GTK_MENU_ITEM(menuItem), mitem->GetSubMenu()->m_menu );
// if adding a submenu to a menu already existing in the menu bar, we
// must set invoking window to allow processing events from this
// submenu
if ( m_invokingWindow )
wxMenubarSetInvokingWindow(mitem->GetSubMenu(), m_invokingWindow);
} }
else // a normal item else // a normal item
{ {