]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/msgdlg.cpp
alpha support for Scale added
[wxWidgets.git] / src / mac / carbon / msgdlg.cpp
index b02af638f246defbb42b5cd4ae0856c45e4a5df1..e0f43288d4d2416360cf90d221437dffd667d0cd 100644 (file)
@@ -9,10 +9,12 @@
 // Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "msgdlg.h"
 #endif
 
+#include "wx/wxprec.h"
+
 #include "wx/app.h"
 #include "wx/msgdlg.h"
 #include "wx/intl.h"
@@ -53,14 +55,15 @@ 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 ;
+        param.version = kStdCFStringAlertVersionOne ;
         
         bool skipDialog = false ;
         
@@ -72,7 +75,7 @@ int wxMessageDialog::ShowModal()
                 param.cancelText     = (CFStringRef) kAlertDefaultCancelText;
                 param.otherText     = cfNoString ;
                 param.helpButton     = false ;
-                param.defaultButton = kAlertStdAlertOKButton;
+                param.defaultButton = m_dialogStyle & wxNO_DEFAULT ? kAlertStdAlertOtherButton : kAlertStdAlertOKButton;
                 param.cancelButton     = kAlertStdAlertCancelButton;
             }
             else
@@ -81,7 +84,7 @@ int wxMessageDialog::ShowModal()
                 param.cancelText     = NULL;
                 param.otherText     = cfNoString ;
                 param.helpButton     = false ;
-                param.defaultButton = kAlertStdAlertOKButton;
+                param.defaultButton = m_dialogStyle & wxNO_DEFAULT ? kAlertStdAlertOtherButton : kAlertStdAlertOKButton;
                 param.cancelButton     = 0;
             }
         }