From: Vadim Zeitlin Date: Mon, 30 Nov 2009 00:30:15 +0000 (+0000) Subject: Fix compilation of image sample with wxUSE_LIBPNG==0. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c8688139b083788a04daf9226a9abf1b28b37903 Fix compilation of image sample with wxUSE_LIBPNG==0. Also don't propose to save the file using the extensions not supported in this library build. Closes #11495. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/samples/image/image.cpp b/samples/image/image.cpp index f42aca9f04..0fac64b19e 100644 --- a/samples/image/image.cpp +++ b/samples/image/image.cpp @@ -210,11 +210,21 @@ private: wxEmptyString, (const wxChar *)NULL, wxT("BMP files (*.bmp)|*.bmp|") +#if wxUSE_LIBPNG wxT("PNG files (*.png)|*.png|") +#endif +#if wxUSE_LIBJPEG wxT("JPEG files (*.jpg)|*.jpg|") +#endif +#if wxUSE_GIF wxT("GIF files (*.gif)|*.gif|") +#endif +#if wxUSE_LIBTIFF wxT("TIFF files (*.tif)|*.tif|") +#endif +#if wxUSE_PCX wxT("PCX files (*.pcx)|*.pcx|") +#endif wxT("ICO files (*.ico)|*.ico|") wxT("CUR files (*.cur)|*.cur"), wxFD_SAVE, @@ -274,6 +284,7 @@ private: } } } +#if wxUSE_LIBPNG else if ( extension == wxT("png") ) { static const int pngvalues[] = @@ -344,6 +355,7 @@ private: } } } +#endif // wxUSE_LIBPNG else if ( extension == wxT("cur") ) { image.Rescale(32,32);