From b3456059883876f83ad04546270f233b9635440a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Wed, 31 Dec 2008 23:40:06 +0000 Subject: [PATCH] backported wxArtProvider::PushBack() to 2.8 so that one can write code compatible with both wx2.8 and wx3 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@57701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/artprov.h | 4 ++++ src/common/artprov.cpp | 5 +++++ version-script.in | 1 + 3 files changed, 10 insertions(+) diff --git a/include/wx/artprov.h b/include/wx/artprov.h index 6caafc3b47..c45ad59d22 100644 --- a/include/wx/artprov.h +++ b/include/wx/artprov.h @@ -122,6 +122,10 @@ public: // Add new provider to the bottom of providers stack (i.e. the provider // will be queried as the last one). +#if wxABI_VERSION >= 20810 + static void PushBack(wxArtProvider *provider); +#endif + // same as PushBack() static void Insert(wxArtProvider *provider); // Remove latest added provider and delete it. diff --git a/src/common/artprov.cpp b/src/common/artprov.cpp index 6d0a4e88d9..d94966fe8a 100644 --- a/src/common/artprov.cpp +++ b/src/common/artprov.cpp @@ -139,6 +139,11 @@ wxArtProvider::~wxArtProvider() sm_providers->Append(provider); } +/*static*/ void wxArtProvider::PushBack(wxArtProvider *provider) +{ + Insert(provider); +} + /*static*/ bool wxArtProvider::Pop() { wxCHECK_MSG( sm_providers, false, _T("no wxArtProvider exists") ); diff --git a/version-script.in b/version-script.in index dbb63c669d..b76a7c2570 100644 --- a/version-script.in +++ b/version-script.in @@ -25,6 +25,7 @@ # public symbols added in 2.8.10 (please keep in alphabetical order): @WX_VERSION_TAG@.10 { + *wxArtProvider*PushBack*; *wxCArrayString*Release*; *wxDCBase*GetFontPointSizeAdjustment*; *wxWindowBase*DragAcceptFiles*;