X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f1ca421b41579701556dee2d15af6c0256dc8495..a219792590b1817eb03dd27ca99b12d42c321465:/src/osx/carbon/icon.cpp diff --git a/src/osx/carbon/icon.cpp b/src/osx/carbon/icon.cpp index ddd2dd43dc..37c815e24d 100644 --- a/src/osx/carbon/icon.cpp +++ b/src/osx/carbon/icon.cpp @@ -203,6 +203,50 @@ bool wxIcon::LoadFile( { theId = kGenericDocumentIcon ; } + else if ( filename == wxT("wxICON_EXECUTABLE_FILE") ) + { + theId = kGenericApplicationIcon ; + } + else if ( filename == wxT("wxICON_CDROM") ) + { + theId = kGenericCDROMIcon ; + } + else if ( filename == wxT("wxICON_FLOPPY") ) + { + theId = kGenericFloppyIcon ; + } + else if ( filename == wxT("wxICON_HARDDISK") ) + { + theId = kGenericHardDiskIcon ; + } + else if ( filename == wxT("wxICON_REMOVABLE") ) + { + theId = kGenericRemovableMediaIcon ; + } + else if ( filename == wxT("wxICON_DELETE") ) + { + theId = kToolbarDeleteIcon ; + } + else if ( filename == wxT("wxICON_GO_BACK") ) + { + theId = kBackwardArrowIcon ; + } + else if ( filename == wxT("wxICON_GO_FORWARD") ) + { + theId = kForwardArrowIcon ; + } + else if ( filename == wxT("wxICON_GO_HOME") ) + { + theId = kToolbarHomeIcon ; + } + else if ( filename == wxT("wxICON_HELP_SETTINGS") ) + { + theId = kGenericFontIcon ; + } + else if ( filename == wxT("wxICON_HELP_PAGE") ) + { + theId = kGenericDocumentIcon ; + } else { IconRef iconRef = NULL ; @@ -290,7 +334,7 @@ bool wxIcon::LoadFile( #endif } } - return true ; + return false; } void wxIcon::CopyFromBitmap( const wxBitmap& bmp ) @@ -309,9 +353,11 @@ bool wxICONResourceHandler::LoadFile( int desiredWidth, int desiredHeight ) { wxIcon icon ; - icon.LoadFile( name , wxBITMAP_TYPE_ICON_RESOURCE , desiredWidth , desiredHeight ) ; - bitmap->CopyFromIcon( icon ) ; - - return bitmap->Ok() ; + if ( icon.LoadFile( name , wxBITMAP_TYPE_ICON_RESOURCE , desiredWidth , desiredHeight ) ) + { + bitmap->CopyFromIcon( icon ) ; + return bitmap->Ok() ; + } + return false; }