X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/feaa5f91e568cd4603ef5e0dc7a4b5a3584b7a04..7b896860bf278d10ef80d05e5ae607604819a4e6:/src/common/iconbndl.cpp diff --git a/src/common/iconbndl.cpp b/src/common/iconbndl.cpp index 8fa0ccd441..8c97c318c9 100644 --- a/src/common/iconbndl.cpp +++ b/src/common/iconbndl.cpp @@ -57,19 +57,19 @@ wxIconBundle::wxIconBundle() { } +#if wxUSE_STREAMS && wxUSE_IMAGE wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type) : wxGDIObject() { AddIcon(file, type); } -#if wxUSE_STREAMS wxIconBundle::wxIconBundle(wxInputStream& stream, wxBitmapType type) : wxGDIObject() { AddIcon(stream, type); } -#endif // wxUSE_STREAMS +#endif // wxUSE_STREAMS && wxUSE_IMAGE wxIconBundle::wxIconBundle(const wxIcon& icon) : wxGDIObject() @@ -92,6 +92,8 @@ void wxIconBundle::DeleteIcons() UnRef(); } +#if wxUSE_STREAMS && wxUSE_IMAGE + namespace { @@ -154,7 +156,11 @@ void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type) } #endif // __WXMAC__ +#if wxUSE_FFILE wxFFileInputStream stream(file); +#elif wxUSE_FILE + wxFileInputStream stream(file); +#endif DoAddIcon ( *this, @@ -163,12 +169,12 @@ void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type) ); } -#if wxUSE_STREAMS void wxIconBundle::AddIcon(wxInputStream& stream, wxBitmapType type) { DoAddIcon(*this, stream, type, _("Failed to load image %d from stream.")); } -#endif // wxUSE_STREAMS + +#endif // wxUSE_STREAMS && wxUSE_IMAGE wxIcon wxIconBundle::GetIcon(const wxSize& size) const { @@ -233,7 +239,7 @@ wxIcon wxIconBundle::GetIconOfExactSize(const wxSize& size) const void wxIconBundle::AddIcon(const wxIcon& icon) { - wxCHECK_RET( icon.IsOk(), _T("invalid icon") ); + wxCHECK_RET( icon.IsOk(), wxT("invalid icon") ); AllocExclusive(); @@ -264,7 +270,7 @@ size_t wxIconBundle::GetIconCount() const wxIcon wxIconBundle::GetIconByIndex(size_t n) const { - wxCHECK_MSG( n < GetIconCount(), wxNullIcon, _T("invalid index") ); + wxCHECK_MSG( n < GetIconCount(), wxNullIcon, wxT("invalid index") ); return M_ICONBUNDLEDATA->m_icons[n]; }