From d5f7923b9ef3f610ec400d07bda7e53b9e0ef543 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Fri, 6 Feb 2004 18:26:52 +0000 Subject: [PATCH] fixing notebook icons for panther git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25536 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/notebmac.cpp | 8 ++++++-- src/mac/notebmac.cpp | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/mac/carbon/notebmac.cpp b/src/mac/carbon/notebmac.cpp index 7de1af74e1..39693f9d0b 100644 --- a/src/mac/carbon/notebmac.cpp +++ b/src/mac/carbon/notebmac.cpp @@ -467,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 ) ; } diff --git a/src/mac/notebmac.cpp b/src/mac/notebmac.cpp index 7de1af74e1..39693f9d0b 100644 --- a/src/mac/notebmac.cpp +++ b/src/mac/notebmac.cpp @@ -467,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 ) ; } -- 2.47.2