X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2afb9e169048b77a41c63b4f4eea3b10daee641a..0bbe61b8c18a1795189f0cf73cc61c14a0fb846d:/src/mac/carbon/msgdlg.cpp diff --git a/src/mac/carbon/msgdlg.cpp b/src/mac/carbon/msgdlg.cpp index ade6197a84..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" @@ -28,7 +29,7 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent, const wxString& message, const wxString& caption, long style, - const wxPoint& pos) + const wxPoint& WXUNUSED(pos)) : wxMessageDialogBase(parent, message, caption, style) { m_yes = _("Yes"); @@ -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;