diff --git a/include/wx/docview.h b/include/wx/docview.h index f69745552d..3a4d899eeb 100644 --- a/include/wx/docview.h +++ b/include/wx/docview.h @@ -141,8 +141,22 @@ public: virtual void SetDocumentTemplate(wxDocTemplate *temp) { m_documentTemplate = temp; } // Get title, or filename if no title, else [unnamed] + // + // NB: this method will be deprecated in wxWidgets 3.0, you still need to + // override it if you need to modify the existing behaviour in this + // version but use GetUserReadableName() below if you just need to call + // it virtual bool GetPrintableName(wxString& buf) const; +#if wxABI_VERSION >= 20805 + wxString GetUserReadableName() const + { + wxString s; + GetPrintableName(s); + return s; + } +#endif // wxABI 2.8.5+ + // Returns a window that can be used as a parent for document-related // dialogs. Override if necessary. virtual wxWindow *GetDocumentWindow() const; diff --git a/version-script.in b/version-script.in index 4f83eec356..a2959fbcdf 100644 --- a/version-script.in +++ b/version-script.in @@ -27,6 +27,7 @@ # public symbols added in 2.8.5 (please keep in alphabetical order): @WX_VERSION_TAG@.5 { global: + *wxDocument*GetUserReadableName*; *wxMetafileDC*DoGetTextExtent*; };