]> git.saurik.com Git - wxWidgets.git/commitdiff
Add standard art providers at the bottom of the art providers stack.
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 28 Dec 2011 13:51:29 +0000 (13:51 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 28 Dec 2011 13:51:29 +0000 (13:51 +0000)
This ensures that any user-defined art providers will be in front of them,
even when they are added at module-initialization time i.e. possibly before
the standard ones.

Closes #12519.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70154 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/artprov.cpp
src/common/artstd.cpp
src/common/arttango.cpp
src/gtk/artgtk.cpp
src/msw/artmsw.cpp
src/osx/artmac.cpp

index c51c08780c43108917a17e4a2b0892c6172bf1a9..908af16369dbed9252989209ffee2f13d4bc2ca0 100644 (file)
@@ -440,13 +440,16 @@ class wxArtProviderModule: public wxModule
 public:
     bool OnInit()
     {
-#if wxUSE_ARTPROVIDER_STD
-        wxArtProvider::InitStdProvider();
-#endif // wxUSE_ARTPROVIDER_STD
+        // The order here is such that the native provider will be used first
+        // and the standard one last as all these default providers add
+        // themselves to the bottom of the stack.
+        wxArtProvider::InitNativeProvider();
 #if wxUSE_ARTPROVIDER_TANGO
         wxArtProvider::InitTangoProvider();
 #endif // wxUSE_ARTPROVIDER_TANGO
-        wxArtProvider::InitNativeProvider();
+#if wxUSE_ARTPROVIDER_STD
+        wxArtProvider::InitStdProvider();
+#endif // wxUSE_ARTPROVIDER_STD
         return true;
     }
     void OnExit()
index 542247d4ae68a147b110769af3c9db5b61aec8e1..b6889e3f878ab50fb9d6f49c2e8de7e27466a0a5 100644 (file)
@@ -45,7 +45,7 @@ protected:
 
 /*static*/ void wxArtProvider::InitStdProvider()
 {
-    wxArtProvider::Push(new wxDefaultArtProvider);
+    wxArtProvider::PushBack(new wxDefaultArtProvider);
 }
 
 // ----------------------------------------------------------------------------
index 49a47d7c1b95fb4a7c7eaf1cd66260ed821283d0..f2c6c00dcfff4a806df608778be28b325c1f0868 100644 (file)
@@ -322,7 +322,7 @@ wxTangoArtProvider::CreateBitmap(const wxArtID& id,
 /* static */
 void wxArtProvider::InitTangoProvider()
 {
-    wxArtProvider::Push(new wxTangoArtProvider);
+    wxArtProvider::PushBack(new wxTangoArtProvider);
 }
 
 #endif // wxUSE_ARTPROVIDER_TANGO
index 88c32a4cacb65eab40066101cf09cce8c3cea584..c438a72a760bc452f6b18c023c8a147abb5365d9 100644 (file)
@@ -47,7 +47,7 @@ protected:
 
 /*static*/ void wxArtProvider::InitNativeProvider()
 {
-    Push(new wxGTK2ArtProvider);
+    PushBack(new wxGTK2ArtProvider);
 }
 
 // ----------------------------------------------------------------------------
index f304ffdea8efd8c81f9ded5593d719902cc21475..22314f1e253b41313a509a0c71129cc1d09e8652 100644 (file)
@@ -91,7 +91,7 @@ wxBitmap wxWindowsArtProvider::CreateBitmap(const wxArtID& id,
 
 /*static*/ void wxArtProvider::InitNativeProvider()
 {
-    Push(new wxWindowsArtProvider);
+    PushBack(new wxWindowsArtProvider);
 }
 
 // ----------------------------------------------------------------------------
index 267516cb7a590bff0ee0633c38b35a7a7c9a78bb..8ca19064871e83053ce4ed4b8794a71a36acce93 100644 (file)
@@ -50,7 +50,7 @@ protected:
 
 /* static */ void wxArtProvider::InitNativeProvider()
 {
-    wxArtProvider::Push(new wxMacArtProvider);
+    PushBack(new wxMacArtProvider);
 }
 
 #if wxOSX_USE_COCOA_OR_CARBON