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:
@@ -371,7 +371,7 @@ void wxNotebook::MacSetupTabs()
|
|||||||
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#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
|
// 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)
|
// accross the icon worlds (even Apple DTS did not find a shorter path)
|
||||||
@@ -391,7 +391,7 @@ void wxNotebook::MacSetupTabs()
|
|||||||
info.u.iconRef = iconRef ;
|
info.u.iconRef = iconRef ;
|
||||||
SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag,
|
SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag,
|
||||||
sizeof( info ), (Ptr)&info );
|
sizeof( info ), (Ptr)&info );
|
||||||
// we ignore the error, since if there is no support for icons on tabs, the data cannot be set
|
wxASSERT_MSG( err == noErr , "Error when setting icon on tab" ) ;
|
||||||
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
|
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
|
||||||
ReleaseIconRef( iconRef ) ;
|
ReleaseIconRef( iconRef ) ;
|
||||||
DisposeHandle( (Handle) iconFamily ) ;
|
DisposeHandle( (Handle) iconFamily ) ;
|
||||||
|
@@ -371,7 +371,7 @@ void wxNotebook::MacSetupTabs()
|
|||||||
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
SetTabEnabled( (ControlHandle) m_macControl , ii+1 , true ) ;
|
||||||
|
|
||||||
#if TARGET_CARBON
|
#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
|
// 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)
|
// accross the icon worlds (even Apple DTS did not find a shorter path)
|
||||||
@@ -391,7 +391,7 @@ void wxNotebook::MacSetupTabs()
|
|||||||
info.u.iconRef = iconRef ;
|
info.u.iconRef = iconRef ;
|
||||||
SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag,
|
SetControlData( (ControlHandle) m_macControl, ii+1,kControlTabImageContentTag,
|
||||||
sizeof( info ), (Ptr)&info );
|
sizeof( info ), (Ptr)&info );
|
||||||
// we ignore the error, since if there is no support for icons on tabs, the data cannot be set
|
wxASSERT_MSG( err == noErr , "Error when setting icon on tab" ) ;
|
||||||
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
|
UnregisterIconRef( 'WXNG' , (OSType) 1 ) ;
|
||||||
ReleaseIconRef( iconRef ) ;
|
ReleaseIconRef( iconRef ) ;
|
||||||
DisposeHandle( (Handle) iconFamily ) ;
|
DisposeHandle( (Handle) iconFamily ) ;
|
||||||
|
Reference in New Issue
Block a user