]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/notebmac.cpp
Hopefully fixed library names generated by wx-config for OS/2's PM port.
[wxWidgets.git] / src / mac / carbon / notebmac.cpp
index 752b676d79249779fa996b720cbba8891b8f73cf..3bc3131591cd8c628bc76ca380797a87b5100c7b 100644 (file)
@@ -22,6 +22,8 @@
 // ----------------------------------------------------------------------------
 #include "wx/wxprec.h"
 
+#if wxUSE_NOTEBOOK
+
 #include "wx/app.h"
 #include "wx/string.h"
 #include "wx/log.h"
@@ -127,7 +129,7 @@ bool wxNotebook::Create(wxWindow *parent,
             tabsize = kControlSizeSmall; 
     }
 
-    m_peer = new wxMacControl() ;
+    m_peer = new wxMacControl(this) ;
     verify_noerr ( CreateTabsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds ,
      tabsize , tabstyle, 0, NULL,  m_peer->GetControlRefAddr() ) );
     
@@ -349,12 +351,12 @@ void wxNotebook::MacSetupTabs()
 
         if ( GetImageList() && GetPageImage(ii) >= 0 && UMAGetSystemVersion() >= 0x1020 )
         {
-            const wxBitmap* bmap = GetImageList()->GetBitmap( GetPageImage(ii ) ) ;
-            if ( bmap )
+            const wxBitmap bmap = GetImageList()->GetBitmap( GetPageImage(ii ) ) ;
+            if ( bmap.Ok() )
             {
                 ControlButtonContentInfo info ;
 
-                wxMacCreateBitmapButton( &info , *bmap ) ;
+                wxMacCreateBitmapButton( &info , bmap ) ;
                 OSStatus err = m_peer->SetData<ControlButtonContentInfo>( ii+1,kControlTabImageContentTag, &info );
                 wxASSERT_MSG( err == noErr , wxT("Error when setting icon on tab") ) ;
                 wxMacReleaseBitmapButton( &info ) ;
@@ -547,3 +549,5 @@ wxInt32 wxNotebook::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTR
     return status ;
 }
 
+#endif
+