X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/427ff66291af2d8dd34ff5ee68c81436997144a1..7f0c3a63a0eee38206d22d29db5c7eef260574ea:/src/mac/carbon/msgdlg.cpp diff --git a/src/mac/carbon/msgdlg.cpp b/src/mac/carbon/msgdlg.cpp index 670d30644e..73548ad9f2 100644 --- a/src/mac/carbon/msgdlg.cpp +++ b/src/mac/carbon/msgdlg.cpp @@ -22,36 +22,6 @@ IMPLEMENT_CLASS(wxMessageDialog, wxDialog) #endif -short language = 0 ; - -void wxMacConvertNewlines( const char *source , char * destination ) ; -void wxMacConvertNewlines( const char *source , char * destination ) -{ - const char *s = source ; - char *d = destination ; - - while( *s ) - { - switch( *s ) - { - case 0x0a : - *d++ = 0x0d ; - ++s ; - break ; - case 0x0d : - *d++ = 0x0d ; - ++s ; - if ( *s == 0x0a ) - ++s ; - break ; - default : - *d++ = *s++ ; - break ; - } - } - *d = 0 ; -} - wxMessageDialog::wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption, long style, const wxPoint& pos) { @@ -83,11 +53,11 @@ int wxMessageDialog::ShowModal() if ( UMAGetSystemVersion() >= 0x1000 ) { AlertStdCFStringAlertParamRec param ; - wxMacCFStringHolder cfNoString(_("No")) ; - wxMacCFStringHolder cfYesString( _("Yes")) ; + wxMacCFStringHolder cfNoString(_("No") , m_font.GetEncoding()) ; + wxMacCFStringHolder cfYesString( _("Yes") , m_font.GetEncoding()) ; - wxMacCFStringHolder cfTitle(m_caption); - wxMacCFStringHolder cfText(m_message); + wxMacCFStringHolder cfTitle(m_caption , m_font.GetEncoding()); + wxMacCFStringHolder cfText(m_message , m_font.GetEncoding()); param.movable = true; param.flags = 0 ; @@ -122,7 +92,7 @@ int wxMessageDialog::ShowModal() { // thats a cancel missing param.defaultText = (CFStringRef) kAlertDefaultOKText ; - param.cancelText = NULL; + param.cancelText = (CFStringRef) kAlertDefaultCancelText ; param.otherText = NULL; param.helpButton = false ; param.defaultButton = kAlertStdAlertOKButton; @@ -197,9 +167,8 @@ int wxMessageDialog::ShowModal() { if (m_dialogStyle & wxCANCEL) { - // thats a cancel missing param.defaultText = (StringPtr) kAlertDefaultOKText ; - param.cancelText = NULL; + param.cancelText = (StringPtr) kAlertDefaultCancelText ; param.otherText = NULL; param.helpButton = false ; param.defaultButton = kAlertStdAlertOKButton;