#include "wx/app.h"
#endif
+#include "wx/thread.h"
#include "wx/mac/uma.h"
const wxString& message,
const wxString& caption,
long style,
- const wxPoint& pos)
+ const wxPoint& WXUNUSED(pos))
: wxMessageDialogBase(parent, message, caption, style)
{
m_yes = _("Yes");
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
}
-#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 */ };
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;