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
This commit is contained in:
Vadim Zeitlin 2014-09-20 22:07:26 +00:00
parent c1741cf677
commit c39f3db6a6

View File

@ -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;