X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/df69528b7eacc7c74f31879e761c804e470d12f8..d90e6104e95614ed74bd9efaf6807f7a32641363:/src/common/artprov.cpp diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index d97e28b455..7661612429 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -20,17 +20,14 @@ #pragma hdrstop #endif +#include "wx/artprov.h" + #ifndef WX_PRECOMP #include "wx/list.h" #include "wx/log.h" #include "wx/hashmap.h" -#endif - -#include "wx/artprov.h" -#include "wx/module.h" - -#if wxUSE_IMAGE #include "wx/image.h" + #include "wx/module.h" #endif // =========================================================================== @@ -102,7 +99,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxArtProvider, wxObject) wxArtProvidersList *wxArtProvider::sm_providers = NULL; wxArtProviderCache *wxArtProvider::sm_cache = NULL; -/*static*/ void wxArtProvider::PushProvider(wxArtProvider *provider) +/*static*/ void wxArtProvider::CommonAddingProvider() { if ( !sm_providers ) { @@ -110,10 +107,21 @@ wxArtProviderCache *wxArtProvider::sm_cache = NULL; sm_cache = new wxArtProviderCache; } - sm_providers->Insert(provider); sm_cache->Clear(); } +/*static*/ void wxArtProvider::PushProvider(wxArtProvider *provider) +{ + CommonAddingProvider(); + sm_providers->Insert(provider); +} + +/*static*/ void wxArtProvider::InsertProvider(wxArtProvider *provider) +{ + CommonAddingProvider(); + sm_providers->Append(provider); +} + /*static*/ bool wxArtProvider::PopProvider() { wxCHECK_MSG( sm_providers, false, _T("no wxArtProvider exists") );