X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/62e54750de89cf868a0fff690d75757d03041a24..c315587c21ed44e54fbb3c1b36f0f70f78314081:/src/osx/carbon/icon.cpp diff --git a/src/osx/carbon/icon.cpp b/src/osx/carbon/icon.cpp index af4c06aa0a..37c815e24d 100644 --- a/src/osx/carbon/icon.cpp +++ b/src/osx/carbon/icon.cpp @@ -203,6 +203,10 @@ bool wxIcon::LoadFile( { theId = kGenericDocumentIcon ; } + else if ( filename == wxT("wxICON_EXECUTABLE_FILE") ) + { + theId = kGenericApplicationIcon ; + } else if ( filename == wxT("wxICON_CDROM") ) { theId = kGenericCDROMIcon ; @@ -330,7 +334,7 @@ bool wxIcon::LoadFile( #endif } } - return true ; + return false; } void wxIcon::CopyFromBitmap( const wxBitmap& bmp ) @@ -349,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; }