X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b337acd7a013aa403736a6c5d14fe2ec5d1a99f3..2ddb4d13585d5235556119fb1937273da9e433a3:/src/mac/carbon/notebmac.cpp diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 3bc3131591..c8b4969a43 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) -#pragma implementation "notebook.h" -#endif - // ============================================================================ // declarations // ============================================================================ @@ -337,17 +333,17 @@ void wxNotebook::MacSetupTabs() m_peer->SetMaximum( GetPageCount() ) ; wxNotebookPage *page; - ControlTabInfoRec info; + ControlTabInfoRecV1 info; const size_t countPages = GetPageCount(); for(size_t ii = 0; ii < countPages; ii++) { page = m_pages[ii]; - info.version = 0; + info.version = kControlTabInfoVersionOne; info.iconSuiteID = 0; - wxMacStringToPascal( page->GetLabel() , info.name ) ; - m_peer->SetData( ii+1, kControlTabInfoTag, &info ) ; - m_peer->SetTabEnabled( ii + 1 , true ) ; + wxMacCFStringHolder cflabel( page->GetLabel() , m_font.GetEncoding() ) ; + info.name = cflabel ; + m_peer->SetData( ii+1, kControlTabInfoTag, &info ) ; if ( GetImageList() && GetPageImage(ii) >= 0 && UMAGetSystemVersion() >= 0x1020 ) { @@ -357,12 +353,15 @@ void wxNotebook::MacSetupTabs() ControlButtonContentInfo info ; wxMacCreateBitmapButton( &info , bmap ) ; - OSStatus err = m_peer->SetData( ii+1,kControlTabImageContentTag, &info ); +#ifdef __WXDEBUG__ + OSStatus err = +#endif // __WXDEBUG__ + m_peer->SetData( ii+1,kControlTabImageContentTag, &info ); wxASSERT_MSG( err == noErr , wxT("Error when setting icon on tab") ) ; wxMacReleaseBitmapButton( &info ) ; } } - + m_peer->SetTabEnabled( ii + 1 , true ) ; } Rect bounds; m_peer->GetRectInWindowCoords( &bounds ) ;