From ee05c45dff5556d97709407985d53f5d782416ef Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 4 May 2013 23:59:37 +0000 Subject: [PATCH] Consistently set wxMenuBar parent in all ports. Previously, wxGTK used the associated frame as wxMenuBar parent, while the other ports did not. Do set the frame as menu bar parent in all ports now. Of course, considering that wxMenuBar is not a window at all, this doesn't necessarily make much sense, but at least it makes the behaviour consistent. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/menucmn.cpp | 2 ++ src/gtk/frame.cpp | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/menucmn.cpp b/src/common/menucmn.cpp index 7230bb103d..dacfbf4d90 100644 --- a/src/common/menucmn.cpp +++ b/src/common/menucmn.cpp @@ -925,6 +925,7 @@ void wxMenuBarBase::Attach(wxFrame *frame) { wxASSERT_MSG( !IsAttached(), wxT("menubar already attached!") ); + SetParent(frame); m_menuBarFrame = frame; } @@ -933,6 +934,7 @@ void wxMenuBarBase::Detach() wxASSERT_MSG( IsAttached(), wxT("detaching unattached menubar") ); m_menuBarFrame = NULL; + SetParent(NULL); } // ---------------------------------------------------------------------------- diff --git a/src/gtk/frame.cpp b/src/gtk/frame.cpp index 5c20c83f85..915b7a2dd2 100644 --- a/src/gtk/frame.cpp +++ b/src/gtk/frame.cpp @@ -304,7 +304,6 @@ void wxFrame::AttachMenuBar( wxMenuBar *menuBar ) hildon_window_set_menu(HILDON_WINDOW(m_widget), GTK_MENU(m_frameMenuBar->m_widget)); #else // !wxUSE_LIBHILDON && !wxUSE_LIBHILDON2 - m_frameMenuBar->SetParent(this); // menubar goes into top of vbox (m_mainWidget) gtk_box_pack_start( -- 2.47.2