(failed) attempts at fixing menu bar swapping
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6549 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
8862e11b01
commit
b4da05a638
@ -146,13 +146,15 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
{
|
||||
menu->SetInvokingWindow( win );
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native hot keys */
|
||||
gtk_accel_group_attach( menu->m_accel, GTK_OBJECT(top_frame->m_widget) );
|
||||
GtkObject *obj = GTK_OBJECT(top_frame->m_widget);
|
||||
if ( !g_slist_find( menu->m_accel->attach_objects, obj ) )
|
||||
gtk_accel_group_attach( menu->m_accel, obj );
|
||||
#endif
|
||||
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
@ -174,7 +176,9 @@ void wxMenuBar::SetInvokingWindow( wxWindow *win )
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native key accelerators indicated by underscroes */
|
||||
gtk_accel_group_attach( m_accel, GTK_OBJECT(top_frame->m_widget) );
|
||||
GtkObject *obj = GTK_OBJECT(top_frame->m_widget);
|
||||
if ( !g_slist_find( m_accel->attach_objects, obj ) )
|
||||
gtk_accel_group_attach( m_accel, obj );
|
||||
#endif
|
||||
|
||||
wxMenuList::Node *node = m_menus.GetFirst();
|
||||
|
@ -146,13 +146,15 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win )
|
||||
{
|
||||
menu->SetInvokingWindow( win );
|
||||
|
||||
#if (GTK_MINOR_VERSION > 0)
|
||||
#if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0)
|
||||
wxWindow *top_frame = win;
|
||||
while (top_frame->GetParent() && !(top_frame->IsTopLevel()))
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native hot keys */
|
||||
gtk_accel_group_attach( menu->m_accel, GTK_OBJECT(top_frame->m_widget) );
|
||||
GtkObject *obj = GTK_OBJECT(top_frame->m_widget);
|
||||
if ( !g_slist_find( menu->m_accel->attach_objects, obj ) )
|
||||
gtk_accel_group_attach( menu->m_accel, obj );
|
||||
#endif
|
||||
|
||||
wxMenuItemList::Node *node = menu->GetMenuItems().GetFirst();
|
||||
@ -174,7 +176,9 @@ void wxMenuBar::SetInvokingWindow( wxWindow *win )
|
||||
top_frame = top_frame->GetParent();
|
||||
|
||||
/* support for native key accelerators indicated by underscroes */
|
||||
gtk_accel_group_attach( m_accel, GTK_OBJECT(top_frame->m_widget) );
|
||||
GtkObject *obj = GTK_OBJECT(top_frame->m_widget);
|
||||
if ( !g_slist_find( m_accel->attach_objects, obj ) )
|
||||
gtk_accel_group_attach( m_accel, obj );
|
||||
#endif
|
||||
|
||||
wxMenuList::Node *node = m_menus.GetFirst();
|
||||
|
Loading…
Reference in New Issue
Block a user