From c8e597f84a5e6b34d948de407f556efb4c540931 Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 26 Apr 2006 16:08:11 +0000 Subject: [PATCH] default button on older systems was not shown with OK, but empty, resulting in wxID_CANCEL returns, patch 1473745 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38923 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/mac/carbon/msgdlg.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/mac/carbon/msgdlg.cpp b/src/mac/carbon/msgdlg.cpp index 8b7fed15a7..da992eae39 100644 --- a/src/mac/carbon/msgdlg.cpp +++ b/src/mac/carbon/msgdlg.cpp @@ -62,6 +62,7 @@ int wxMessageDialog::ShowModal() wxMacCFStringHolder cfNoString( wxT("No"), m_font.GetEncoding() ); wxMacCFStringHolder cfYesString( wxT("Yes"), m_font.GetEncoding() ); + wxMacCFStringHolder cfOKString( _("OK") , m_font.GetEncoding()) ; wxMacCFStringHolder cfCancelString( wxT("Cancel"), m_font.GetEncoding() ); int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ }; @@ -92,6 +93,8 @@ int wxMessageDialog::ShowModal() { // the MSW implementation even shows an OK button if it is not specified, we'll do the same buttonId[0] = wxID_OK; + // using null as default title does not work on earlier systems + defaultButtonTitle = cfOKString; if (style & wxCANCEL) { alternateButtonTitle = cfCancelString; -- 2.45.2