X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7cacb43db1e69b87b257a67912b4d52995b070a..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/cocoa/icon.mm diff --git a/src/cocoa/icon.mm b/src/cocoa/icon.mm index 09924c8cb7..91b059ba59 100644 --- a/src/cocoa/icon.mm +++ b/src/cocoa/icon.mm @@ -108,17 +108,9 @@ bool wxIcon::CreateFromXpm(const char **xpm) bool wxIcon::LoadFile(const wxString& filename, wxBitmapType type, int desiredWidth, int desiredHeight) { - UnRef(); - - m_refData = new wxIconRefData; - M_ICONDATA->m_width = 5; - M_ICONDATA->m_height = 5; - M_ICONDATA->m_cocoaNSImage = [[NSImage alloc] initWithSize:NSMakeSize(5,5)]; - M_ICONDATA->m_ok = true; - M_ICONDATA->m_numColors = 0; - M_ICONDATA->m_quality = 0; - - return false; + wxBitmap bitmap(filename, type); + CopyFromBitmap(bitmap); + return bitmap.Ok(); } void wxIcon::CopyFromBitmap(const wxBitmap& bitmap)