]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/artprov.cpp
fixed typo in previous commit
[wxWidgets.git] / src / common / artprov.cpp
index 5d3ab8655e922548c1e64adcb0f83720e17879fd..918dc3307a1d53375bd074cccb02a2d0d1831515 100644 (file)
 #ifndef WX_PRECOMP
     #include "wx/list.h"
     #include "wx/log.h"
+    #include "wx/hashmap.h"
+    #include "wx/image.h"
 #endif
 
 #include "wx/artprov.h"
-#include "wx/hashmap.h"
 #include "wx/module.h"
 
-#if wxUSE_IMAGE
-    #include "wx/image.h"
-#endif
-
 // ===========================================================================
 // implementation
 // ===========================================================================
@@ -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") );