From c39f3db6a6aa8611b68d68a5ce772f1ff935f584 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 20 Sep 2014 22:07:26 +0000 Subject: [PATCH] Return the caption from wxMessageDialog::GetTitle(). It was unexpected that wxMessageDialog::GetTitle() returned empty string even when non-empty caption, which is just another word for title, was specified. Implement GetTitle() as synonym for GetCaption() and also provide SetTitle() for consistency. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@77741 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/msgdlg.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/wx/msgdlg.h b/include/wx/msgdlg.h index 1f802618b7..10f9ed6a07 100644 --- a/include/wx/msgdlg.h +++ b/include/wx/msgdlg.h @@ -101,6 +101,12 @@ public: wxString GetCaption() const { return m_caption; } + // Title and caption are the same thing, GetCaption() mostly exists just + // for compatibility. + virtual void SetTitle(const wxString& title) { m_caption = title; } + virtual wxString GetTitle() const { return m_caption; } + + virtual void SetMessage(const wxString& message) { m_message = message;