Add standard art providers at the bottom of the art providers stack.

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
This commit is contained in:
Vadim Zeitlin 2011-12-28 13:51:29 +00:00
parent 91452726c2
commit 0d68cd1359
6 changed files with 12 additions and 9 deletions

View 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()

View File

@ -45,7 +45,7 @@ protected:
/*static*/ void wxArtProvider::InitStdProvider()
{
wxArtProvider::Push(new wxDefaultArtProvider);
wxArtProvider::PushBack(new wxDefaultArtProvider);
}
// ----------------------------------------------------------------------------

View 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

View File

@ -47,7 +47,7 @@ protected:
/*static*/ void wxArtProvider::InitNativeProvider()
{
Push(new wxGTK2ArtProvider);
PushBack(new wxGTK2ArtProvider);
}
// ----------------------------------------------------------------------------

View File

@ -91,7 +91,7 @@ wxBitmap wxWindowsArtProvider::CreateBitmap(const wxArtID& id,
/*static*/ void wxArtProvider::InitNativeProvider()
{
Push(new wxWindowsArtProvider);
PushBack(new wxWindowsArtProvider);
}
// ----------------------------------------------------------------------------

View File

@ -50,7 +50,7 @@ protected:
/* static */ void wxArtProvider::InitNativeProvider()
{
wxArtProvider::Push(new wxMacArtProvider);
PushBack(new wxMacArtProvider);
}
#if wxOSX_USE_COCOA_OR_CARBON