]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/frame.cpp
Make wxr resources work in Unicode mode.
[wxWidgets.git] / src / mac / frame.cpp
index 4d83421744edd49d93ea8d7f8ef3743007c85a7f..7f1860a837a605dfcc91e3e140b98b93ff758e54 100644 (file)
@@ -231,9 +231,35 @@ void wxFrame::OnActivate(wxActivateEvent& event)
            {
                m_frameMenuBar->MacInstallMenuBar() ;
            }
            {
                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();
+}
+
+void wxFrame::AttachMenuBar( wxMenuBar *menuBar )
+{
+    wxFrameBase::AttachMenuBar(menuBar);
+
+    if (m_frameMenuBar)
+    {
+        m_frameMenuBar->SetInvokingWindow( this );
+    }
+}
+
 void wxFrame::DoGetClientSize(int *x, int *y) const
 {
        wxWindow::DoGetClientSize( x , y ) ;
 void wxFrame::DoGetClientSize(int *x, int *y) const
 {
        wxWindow::DoGetClientSize( x , y ) ;