X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/899544330f37440c140b72a014c518a911b5b7a4..8064223b7b1b3657363b7a635c381b9269d95e55:/src/mac/carbon/msgdlg.cpp diff --git a/src/mac/carbon/msgdlg.cpp b/src/mac/carbon/msgdlg.cpp index 0b4f029de2..830efb6f27 100644 --- a/src/mac/carbon/msgdlg.cpp +++ b/src/mac/carbon/msgdlg.cpp @@ -18,6 +18,7 @@ #include "wx/app.h" #endif +#include "wx/thread.h" #include "wx/mac/uma.h" @@ -75,13 +76,13 @@ int wxMessageDialog::ShowModal() AlertType alertType = kAlertPlainAlert; if (style & wxICON_EXCLAMATION) - alertType = kAlertNoteAlert; + alertType = kAlertCautionAlert; else if (style & wxICON_HAND) alertType = kAlertStopAlert; else if (style & wxICON_INFORMATION) alertType = kAlertNoteAlert; else if (style & wxICON_QUESTION) - alertType = kAlertCautionAlert; + alertType = kAlertNoteAlert; // work out what to display @@ -103,20 +104,19 @@ int wxMessageDialog::ShowModal() } -#if TARGET_API_MAC_OSX if ( !wxIsMainThread() ) { CFStringRef defaultButtonTitle = NULL; CFStringRef alternateButtonTitle = NULL; CFStringRef otherButtonTitle = NULL; - wxMacCFStringHolder cfTitle( msgtitle, m_font.GetEncoding() ); - wxMacCFStringHolder cfText( msgtext, m_font.GetEncoding() ); + wxCFStringRef cfTitle( msgtitle, GetFont().GetEncoding() ); + wxCFStringRef cfText( msgtext, GetFont().GetEncoding() ); - wxMacCFStringHolder cfNoString( m_no.c_str(), m_font.GetEncoding() ); - wxMacCFStringHolder cfYesString( m_yes.c_str(), m_font.GetEncoding() ); - wxMacCFStringHolder cfOKString( m_ok.c_str() , m_font.GetEncoding()) ; - wxMacCFStringHolder cfCancelString( m_cancel.c_str(), m_font.GetEncoding() ); + wxCFStringRef cfNoString( m_no.c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfYesString( m_yes.c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfOKString( m_ok.c_str() , GetFont().GetEncoding()) ; + wxCFStringRef cfCancelString( m_cancel.c_str(), GetFont().GetEncoding() ); int buttonId[4] = { 0, 0, 0, wxID_CANCEL /* time-out */ }; @@ -163,18 +163,17 @@ int wxMessageDialog::ShowModal() resultbutton = buttonId[exitButton]; } else -#endif { short result; AlertStdCFStringAlertParamRec param; - wxMacCFStringHolder cfNoString( m_no.c_str(), m_font.GetEncoding() ); - wxMacCFStringHolder cfYesString( m_yes.c_str(), m_font.GetEncoding() ); - wxMacCFStringHolder cfOKString( m_ok.c_str(), m_font.GetEncoding() ); - wxMacCFStringHolder cfCancelString( m_cancel.c_str(), m_font.GetEncoding() ); + wxCFStringRef cfNoString( m_no.c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfYesString( m_yes.c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfOKString( m_ok.c_str(), GetFont().GetEncoding() ); + wxCFStringRef cfCancelString( m_cancel.c_str(), GetFont().GetEncoding() ); - wxMacCFStringHolder cfTitle( msgtitle, m_font.GetEncoding() ); - wxMacCFStringHolder cfText( msgtext, m_font.GetEncoding() ); + wxCFStringRef cfTitle( msgtitle, GetFont().GetEncoding() ); + wxCFStringRef cfText( msgtext, GetFont().GetEncoding() ); param.movable = true; param.flags = 0;