small change (honour 'verbose' parameter in LoadFile)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,8 +1,7 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: imaggif.cpp
|
// Name: imaggif.cpp
|
||||||
// Purpose: wxGIFHandler
|
// Purpose: wxGIFHandler
|
||||||
// Author: Vaclav Slavik
|
// Author: Vaclav Slavik & Guillermo Rodriguez Garcia
|
||||||
// Based on wxGIFDecoder by Guillermo Rodriguez Garcia
|
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows licence
|
// Licence: wxWindows licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
@@ -23,13 +22,17 @@
|
|||||||
# include "wx/defs.h"
|
# include "wx/defs.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 1 // change this to #if wxUSE_GIF
|
||||||
|
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/gifdecod.h"
|
#include "wx/gifdecod.h"
|
||||||
#include "wx/wfstream.h"
|
#include "wx/wfstream.h"
|
||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
|
||||||
|
#if !USE_SHARED_LIBRARIES
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler)
|
IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler)
|
||||||
|
#endif
|
||||||
|
|
||||||
#if wxUSE_STREAMS
|
#if wxUSE_STREAMS
|
||||||
|
|
||||||
@@ -37,7 +40,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxGIFHandler,wxImageHandler)
|
|||||||
// wxGIFHandler
|
// wxGIFHandler
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSED(verbose) )
|
bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose )
|
||||||
{
|
{
|
||||||
wxGIFDecoder *decod;
|
wxGIFDecoder *decod;
|
||||||
bool ok;
|
bool ok;
|
||||||
@@ -46,7 +49,9 @@ bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE
|
|||||||
|
|
||||||
if (decod->ReadGIF() != E_OK)
|
if (decod->ReadGIF() != E_OK)
|
||||||
{
|
{
|
||||||
wxLogDebug(_T("Error reading GIF"));
|
if (verbose)
|
||||||
|
wxLogDebug(_T("Error reading GIF"));
|
||||||
|
|
||||||
delete decod;
|
delete decod;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
@@ -61,7 +66,9 @@ bool wxGIFHandler::LoadFile( wxImage *image, wxInputStream& stream, bool WXUNUSE
|
|||||||
bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image),
|
bool wxGIFHandler::SaveFile( wxImage * WXUNUSED(image),
|
||||||
wxOutputStream& WXUNUSED(stream), bool verbose )
|
wxOutputStream& WXUNUSED(stream), bool verbose )
|
||||||
{
|
{
|
||||||
if (verbose) wxLogDebug(_T("wxGIFHandler is read-only!!"));
|
if (verbose)
|
||||||
|
wxLogDebug(_T("wxGIFHandler is read-only!!"));
|
||||||
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,3 +85,7 @@ bool wxGIFHandler::CanRead( wxInputStream& stream )
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
// wxUSE_STREAMS
|
||||||
|
|
||||||
|
#endif
|
||||||
|
// wxUSE_GIF
|
||||||
|
Reference in New Issue
Block a user