X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/461fe6e2559a3096d4985a50ba106f26ed890a1d..590e21b0e29d2406625227419e39b671b581a6a5:/src/mac/carbon/notebmac.cpp diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 150fe2e87b..39693f9d0b 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -62,7 +62,9 @@ IMPLEMENT_DYNAMIC_CLASS(wxNotebookEvent, wxCommandEvent) // mode, or inset. I think edge to edge conforms better to the other ports, // and inset mode is better accomplished with space around the wxNotebook rather // than within it. --Robin -#define wxMAC_EDGE_TO_EDGE 1 + +// CS : had to switch off tight spacing due to 10.3 problems +#define wxMAC_EDGE_TO_EDGE 0 static inline int wxMacTabMargin(long nbStyle, long side) { @@ -450,7 +452,7 @@ void wxNotebook::MacSetupTabs() // afterwards Unregister it (IconRef is ref counted, so it will stay on the tab even if we // unregister it) in case this will ever lead to having the same icon everywhere add some kind // of static counter - wxBitmap* bmap = GetImageList()->GetBitmap( GetPageImage(ii ) ) ; + const wxBitmap* bmap = GetImageList()->GetBitmap( GetPageImage(ii ) ) ; if ( bmap ) { wxBitmap scaledBitmap ; @@ -465,14 +467,18 @@ void wxNotebook::MacSetupTabs() OSErr err = SetIconFamilyData( iconFamily, 'PICT' , (Handle) info.u.picture ) ; wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ; IconRef iconRef ; - err = RegisterIconRefFromIconFamily( 'WXNG' , (OSType) 1 , iconFamily, &iconRef ) ; + err = RegisterIconRefFromIconFamily( 'WXNG' , (OSType) 1, iconFamily, &iconRef ) ; wxASSERT_MSG( err == noErr , wxT("Error when adding bitmap") ) ; info.contentType = kControlContentIconRef ; info.u.iconRef = iconRef ; SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag, sizeof( info ), (Ptr)&info ); wxASSERT_MSG( err == noErr , wxT("Error when setting icon on tab") ) ; - UnregisterIconRef( 'WXNG' , (OSType) 1 ) ; + if ( UMAGetSystemVersion() <= 0x1030 ) + { + UnregisterIconRef( 'WXNG' , (OSType) 1 ) ; + } + ReleaseIconRef( iconRef ) ; DisposeHandle( (Handle) iconFamily ) ; }