X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/51c4d2a5a05cc996e3e9085e0d95b7a555ba163b..80a779275ae04443c568dca919adb26cf6f5002c:/src/mac/carbon/msgdlg.cpp diff --git a/src/mac/carbon/msgdlg.cpp b/src/mac/carbon/msgdlg.cpp index aa64dc2d0c..fe6cf21729 100644 --- a/src/mac/carbon/msgdlg.cpp +++ b/src/mac/carbon/msgdlg.cpp @@ -11,9 +11,13 @@ #include "wx/wxprec.h" -#include "wx/app.h" #include "wx/msgdlg.h" -#include "wx/intl.h" + +#ifndef WX_PRECOMP + #include "wx/intl.h" + #include "wx/app.h" +#endif + #include "wx/mac/uma.h" @@ -56,9 +60,10 @@ int wxMessageDialog::ShowModal() wxMacCFStringHolder cfTitle( m_caption, m_font.GetEncoding() ); wxMacCFStringHolder cfText( m_message, m_font.GetEncoding() ); - wxMacCFStringHolder cfNoString( wxT("No"), m_font.GetEncoding() ); - wxMacCFStringHolder cfYesString( wxT("Yes"), m_font.GetEncoding() ); - wxMacCFStringHolder cfCancelString( wxT("Cancel"), m_font.GetEncoding() ); + wxMacCFStringHolder cfNoString( _("No"), m_font.GetEncoding() ); + wxMacCFStringHolder cfYesString( _("Yes"), m_font.GetEncoding() ); + wxMacCFStringHolder cfOKString( _("OK") , m_font.GetEncoding()) ; + wxMacCFStringHolder cfCancelString( _("Cancel"), m_font.GetEncoding() ); int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ }; @@ -88,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; @@ -109,8 +116,8 @@ int wxMessageDialog::ShowModal() if ( UMAGetSystemVersion() >= 0x1000 ) { AlertStdCFStringAlertParamRec param; - wxMacCFStringHolder cfNoString( wxT("No"), m_font.GetEncoding() ); - wxMacCFStringHolder cfYesString( wxT("Yes"), m_font.GetEncoding() ); + wxMacCFStringHolder cfNoString( _("No"), m_font.GetEncoding() ); + wxMacCFStringHolder cfYesString( _("Yes"), m_font.GetEncoding() ); wxMacCFStringHolder cfTitle( m_caption, m_font.GetEncoding() ); wxMacCFStringHolder cfText( m_message, m_font.GetEncoding() ); @@ -192,8 +199,8 @@ int wxMessageDialog::ShowModal() Str255 pascalTitle, pascalText; wxMacStringToPascal( m_caption, pascalTitle ); - wxMacStringToPascal( wxT("Yes"), yesPString ); - wxMacStringToPascal( wxT("No"), noPString ); + wxMacStringToPascal( _("Yes"), yesPString ); + wxMacStringToPascal( _("No"), noPString ); wxMacStringToPascal( m_message, pascalText ); param.movable = true; @@ -294,4 +301,3 @@ int wxMessageDialog::ShowModal() return resultbutton; } -