X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/89c20ac15cdcff42502723c0b52ba0e37a8c6275..447fd332c8c554c05fa0bb889a5374a550b33391:/src/common/artprov.cpp diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index 1dda57dd33..9c3fda0143 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -13,7 +13,7 @@ // headers // --------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "artprov.h" #endif @@ -32,10 +32,9 @@ #include "wx/artprov.h" #include "wx/hashmap.h" #include "wx/module.h" +#if wxUSE_IMAGE #include "wx/image.h" - -// For the purposes of forcing this module to link -extern char g_ArtProviderModule; +#endif // =========================================================================== // implementation @@ -84,9 +83,6 @@ bool wxArtProviderCache::GetBitmap(const wxString& full_id, wxBitmap* bmp) void wxArtProviderCache::Clear() { - // Hack to make the default provider link - // with the application - g_ArtProviderModule = 0; m_bitmapsHash.clear(); } @@ -173,6 +169,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; bmp = node->GetData()->CreateBitmap(id, client, size); if ( bmp.Ok() ) { +#if wxUSE_IMAGE if ( size != wxDefaultSize && (bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) ) { @@ -180,6 +177,7 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; img.Rescale(size.x, size.y); bmp = wxBitmap(img); } +#endif break; } } @@ -212,6 +210,7 @@ public: bool OnInit() { wxArtProvider::InitStdProvider(); + wxArtProvider::InitNativeProvider(); return TRUE; } void OnExit()