X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9a83f860948059b0273b5cc6d9e43fadad3ebfca..cdaed652d7d2b20bc9f508d45f77a280f88279d9:/src/common/iconbndl.cpp diff --git a/src/common/iconbndl.cpp b/src/common/iconbndl.cpp index 5d509c0158..e87312bc5e 100644 --- a/src/common/iconbndl.cpp +++ b/src/common/iconbndl.cpp @@ -57,19 +57,22 @@ wxIconBundle::wxIconBundle() { } -#if wxUSE_STREAMS +#if wxUSE_STREAMS && wxUSE_IMAGE + +#if wxUSE_FFILE || wxUSE_FILE wxIconBundle::wxIconBundle(const wxString& file, wxBitmapType type) : wxGDIObject() { AddIcon(file, type); } +#endif // wxUSE_FFILE || wxUSE_FILE 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,7 +95,7 @@ void wxIconBundle::DeleteIcons() UnRef(); } -#if wxUSE_STREAMS +#if wxUSE_STREAMS && wxUSE_IMAGE namespace { @@ -141,6 +144,8 @@ void DoAddIcon(wxIconBundle& bundle, } // anonymous namespace +#if wxUSE_FFILE || wxUSE_FILE + void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type) { #ifdef __WXMAC__ @@ -156,7 +161,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, @@ -165,12 +174,14 @@ void wxIconBundle::AddIcon(const wxString& file, wxBitmapType type) ); } +#endif // wxUSE_FFILE || wxUSE_FILE + 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 {