+ if ( m_frameMenuBar != NULL )
+ {
+ m_frameMenuBar->MacInstallMenuBar() ;
+ }
+ else if (wxTheApp->GetTopWindow() && wxTheApp->GetTopWindow()->IsKindOf(CLASSINFO(wxFrame)))
+ {
+ // Trying toplevel frame menbar
+ if( ((wxFrame*)wxTheApp->GetTopWindow())->GetMenuBar() )
+ ((wxFrame*)wxTheApp->GetTopWindow())->GetMenuBar()->MacInstallMenuBar();
+ }
+ }
+}
+
+void wxFrame::DetachMenuBar()
+{
+ if ( m_frameMenuBar )
+ {
+ m_frameMenuBar->UnsetInvokingWindow();
+ }
+
+ wxFrameBase::DetachMenuBar();