X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5293e4b7109139cc51052d57c0585716d6250b76..66c2bf7b1d9326fb650acfaae22ec50528cfbf7c:/include/wx/persist/window.h?ds=sidebyside diff --git a/include/wx/persist/window.h b/include/wx/persist/window.h index 84c27ba35c..279e11d26d 100644 --- a/include/wx/persist/window.h +++ b/include/wx/persist/window.h @@ -3,7 +3,6 @@ // Purpose: wxPersistentWindow declaration // Author: Vadim Zeitlin // Created: 2009-01-23 -// RCS-ID: $Id$ // Copyright: (c) 2009 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -23,29 +22,15 @@ // type-independent part of wxPersistentWindow class wxPersistentWindowBase : -#if wxEVENTS_COMPATIBILITY_2_8 - // in compatibility mode we need to derive from wxEvtHandler to be able to - // handle events - public wxEvtHandler , -#endif + wxBIND_OR_CONNECT_HACK_BASE_CLASS public wxPersistentObject { public: wxPersistentWindowBase(wxWindow *win) : wxPersistentObject(win) { -#if wxEVENTS_COMPATIBILITY_2_8 - win->Connect - ( - wxEVT_DESTROY, - wxWindowDestroyEventHandler( - wxPersistentWindowBase::HandleDestroy), - NULL, - this - ); -#else // !wxEVENTS_COMPATIBILITY_2_8 - win->Bind(wxEVT_DESTROY, &wxPersistentWindowBase::HandleDestroy, this); -#endif // wxEVENTS_COMPATIBILITY_2_8/!wxEVENTS_COMPATIBILITY_2_8 + wxBIND_OR_CONNECT_HACK(win, wxEVT_DESTROY, wxWindowDestroyEventHandler, + wxPersistentWindowBase::HandleDestroy, this); } virtual wxString GetName() const