]> git.saurik.com Git - wxWidgets.git/commitdiff
NO_DEFAULT support added
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 11 Sep 2004 08:25:17 +0000 (08:25 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 11 Sep 2004 08:25:17 +0000 (08:25 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29092 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/msgdlg.cpp

index 73548ad9f219a8478e3212e69e0017688b5f3d9b..6f1cfbfdc6e63f0cd449269a02a65a6f6757abd5 100644 (file)
@@ -61,6 +61,7 @@ int wxMessageDialog::ShowModal()
                 
         param.movable = true;
         param.flags = 0 ;
+        param.version = kStdCFStringAlertVersionOne ;
         
         bool skipDialog = false ;
         
@@ -72,7 +73,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 +82,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;
             }
         }