From 8a68d8b6c13323ad187062b0be009f6d22af77f0 Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Garcia Date: Fri, 27 Aug 1999 11:29:10 +0000 Subject: [PATCH] small change (honour 'verbose' parameter in LoadFile) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/imaggif.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/common/imaggif.cpp b/src/common/imaggif.cpp index c15f3bfc58..f719a2ad41 100644 --- a/src/common/imaggif.cpp +++ b/src/common/imaggif.cpp @@ -1,8 +1,7 @@ ///////////////////////////////////////////////////////////////////////////// // Name: imaggif.cpp // Purpose: wxGIFHandler -// Author: Vaclav Slavik -// Based on wxGIFDecoder by Guillermo Rodriguez Garcia +// Author: Vaclav Slavik & Guillermo Rodriguez Garcia // RCS-ID: $Id$ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -23,13 +22,17 @@ # include "wx/defs.h" #endif +#if 1 // change this to #if wxUSE_GIF + #include "wx/image.h" #include "wx/gifdecod.h" #include "wx/wfstream.h" #include "wx/module.h" #include "wx/log.h" +#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler) +#endif #if wxUSE_STREAMS @@ -37,7 +40,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler) // wxGIFHandler //----------------------------------------------------------------------------- -bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSED(verbose) ) +bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose ) { wxGIFDecoder *decod; bool ok; @@ -46,7 +49,9 @@ bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE if (decod->ReadGIF() != E_OK) { - wxLogDebug(_T("Error reading GIF")); + if (verbose) + wxLogDebug(_T("Error reading GIF")); + delete decod; return FALSE; } @@ -61,7 +66,9 @@ bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image), wxOutputStream& WXUNUSED(stream), bool verbose ) { - if (verbose) wxLogDebug(_T("wxGIFHandler is read-only!!")); + if (verbose) + wxLogDebug(_T("wxGIFHandler is read-only!!")); + return FALSE; } @@ -78,3 +85,7 @@ bool wxGIFHandler::CanRead( wxInputStream& stream ) } #endif + // wxUSE_STREAMS + +#endif + // wxUSE_GIF -- 2.45.2