]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/frame.mm
key/char event changes for inline editing (japanese/hirgana etc)
[wxWidgets.git] / src / cocoa / frame.mm
index 9277c357f6f6406a149790b57d7eefc9cd459b64..90ff51a4ffc80115ef05aa9e5b067633213c0c11 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     2003/03/16
 // RCS-ID:      $Id:
 // Copyright:   (c) 2003 David Elliott
-// Licence:     wxWindows license
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/wxprec.h"
@@ -179,6 +179,8 @@ void wxFrame::UpdateFrameNSView()
     if(m_frameToolBar)
     {
         NSView *tbarNSView = m_frameToolBar->GetNSViewForSuperview();
+        // If the toolbar doesn't have a superview then set it to our
+        // content view.
         if(![tbarNSView superview])
             [m_frameNSView addSubview: tbarNSView];
         // Do this after addSubView so that SetSize can work
@@ -278,14 +280,7 @@ wxToolBar* wxFrame::CreateToolBar(long style,
                                       const wxString& name)
 {
     wxAutoNSAutoreleasePool pool;
-    wxFrameBase::CreateToolBar(style,winid,name);
-    if(m_frameToolBar)
-    {
-        m_frameToolBar->CocoaRemoveFromParent();
-        m_frameToolBar->SetOwningFrame(this);
-    }
-    UpdateFrameNSView();
-    return m_frameToolBar;
+    return wxFrameBase::CreateToolBar(style,winid,name);
 }
 #endif // wxUSE_TOOLBAR