changed notebook icon code to only trigger under 10.2 and later (it is not working/buggy under 10.1.X)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@17607 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2002-10-22 15:41:00 +00:00
parent 97138ef264
commit 8dfed6e742
2 changed files with 6 additions and 6 deletions

View File

@@ -371,7 +371,7 @@ void wxNotebook::MacSetupTabs()
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
#if TARGET_CARBON
if ( GetImageList() && GetPageImage(ii) >= 0 )
if ( GetImageList() && GetPageImage(ii) >= 0 && UMAGetSystemVersion() >= 0x1020 )
{
// tab controls only support very specific types of images, therefore we are doing an odyssee
// accross the icon worlds (even Apple DTS did not find a shorter path)
@@ -391,8 +391,8 @@ void wxNotebook::MacSetupTabs()
info.u.iconRef = iconRef ;
SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag,
sizeof( info ), (Ptr)&info );
// we ignore the error, since if there is no support for icons on tabs, the data cannot be set
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
wxASSERT_MSG( err == noErr , "Error when setting icon on tab" ) ;
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
ReleaseIconRef( iconRef ) ;
DisposeHandle( (Handle) iconFamily ) ;
}

View File

@@ -371,7 +371,7 @@ void wxNotebook::MacSetupTabs()
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
#if TARGET_CARBON
if ( GetImageList() && GetPageImage(ii) >= 0 )
if ( GetImageList() && GetPageImage(ii) >= 0 && UMAGetSystemVersion() >= 0x1020 )
{
// tab controls only support very specific types of images, therefore we are doing an odyssee
// accross the icon worlds (even Apple DTS did not find a shorter path)
@@ -391,8 +391,8 @@ void wxNotebook::MacSetupTabs()
info.u.iconRef = iconRef ;
SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag,
sizeof( info ), (Ptr)&info );
// we ignore the error, since if there is no support for icons on tabs, the data cannot be set
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
wxASSERT_MSG( err == noErr , "Error when setting icon on tab" ) ;
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
ReleaseIconRef( iconRef ) ;
DisposeHandle( (Handle) iconFamily ) ;
}