X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a583e623c09879180952d18e865ec3373e69e1c7..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/gtk1/menu.cpp?ds=inline diff --git a/src/gtk1/menu.cpp b/src/gtk1/menu.cpp index 66fc6d72fb..750593b533 100644 --- a/src/gtk1/menu.cpp +++ b/src/gtk1/menu.cpp @@ -121,7 +121,7 @@ static void wxMenubarUnsetInvokingWindow( wxMenu *menu, wxWindow *win ) #if (GTK_MINOR_VERSION > 0) wxWindow *top_frame = win; - while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame)) + while (top_frame->GetParent() && !(top_frame->IsTopLevel())) top_frame = top_frame->GetParent(); /* support for native hot keys */ @@ -144,7 +144,7 @@ static void wxMenubarSetInvokingWindow( wxMenu *menu, wxWindow *win ) #if (GTK_MINOR_VERSION > 0) wxWindow *top_frame = win; - while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame)) + while (top_frame->GetParent() && !(top_frame->IsTopLevel())) top_frame = top_frame->GetParent(); /* support for native hot keys */ @@ -166,7 +166,7 @@ void wxMenuBar::SetInvokingWindow( wxWindow *win ) m_invokingWindow = win; #if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0) wxWindow *top_frame = win; - while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame)) + while (top_frame->GetParent() && !(top_frame->IsTopLevel())) top_frame = top_frame->GetParent(); /* support for native key accelerators indicated by underscroes */ @@ -187,7 +187,7 @@ void wxMenuBar::UnsetInvokingWindow( wxWindow *win ) m_invokingWindow = (wxWindow*) NULL; #if (GTK_MINOR_VERSION > 0) && (GTK_MICRO_VERSION > 0) wxWindow *top_frame = win; - while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame)) + while (top_frame->GetParent() && !(top_frame->IsTopLevel())) top_frame = top_frame->GetParent(); /* support for native key accelerators indicated by underscroes */ @@ -469,13 +469,13 @@ static void gtk_menu_clicked_callback( GtkWidget *widget, wxMenu *menu ) event.SetEventObject( menu ); event.SetInt(id ); -#if WXWIN_COMPATIBILITY +#if wxUSE_MENU_CALLBACK if (menu->GetCallback()) { (void) (*(menu->GetCallback())) (*menu, event); return; } -#endif // WXWIN_COMPATIBILITY +#endif // wxUSE_MENU_CALLBACK if (menu->GetEventHandler()->ProcessEvent(event)) return;