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
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()
/*static*/ void wxArtProvider::InitStdProvider()
{
- wxArtProvider::Push(new wxDefaultArtProvider);
+ wxArtProvider::PushBack(new wxDefaultArtProvider);
}
// ----------------------------------------------------------------------------
/* static */
void wxArtProvider::InitTangoProvider()
{
- wxArtProvider::Push(new wxTangoArtProvider);
+ wxArtProvider::PushBack(new wxTangoArtProvider);
}
#endif // wxUSE_ARTPROVIDER_TANGO
/*static*/ void wxArtProvider::InitNativeProvider()
{
- Push(new wxGTK2ArtProvider);
+ PushBack(new wxGTK2ArtProvider);
}
// ----------------------------------------------------------------------------
/*static*/ void wxArtProvider::InitNativeProvider()
{
- Push(new wxWindowsArtProvider);
+ PushBack(new wxWindowsArtProvider);
}
// ----------------------------------------------------------------------------
/* static */ void wxArtProvider::InitNativeProvider()
{
- wxArtProvider::Push(new wxMacArtProvider);
+ PushBack(new wxMacArtProvider);
}
#if wxOSX_USE_COCOA_OR_CARBON