X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f135deaa906dcee5f5217e7d279ff5260ebf8f55..75504144d2ee5ce2bc62d186f04b2d445c2048c5:/src/osx/carbon/msgdlg.cpp diff --git a/src/osx/carbon/msgdlg.cpp b/src/osx/carbon/msgdlg.cpp index d7d024529c..20be0469e5 100644 --- a/src/osx/carbon/msgdlg.cpp +++ b/src/osx/carbon/msgdlg.cpp @@ -40,17 +40,26 @@ int wxMessageDialog::ShowModal() const long style = GetMessageDialogStyle(); - wxASSERT_MSG( (style & 0x3F) != wxYES, wxT("this style is not supported on Mac") ); + wxASSERT_MSG( (style & 0x3F) != wxYES, + "this style is not supported on Mac" ); AlertType alertType = kAlertPlainAlert; - if (style & wxICON_EXCLAMATION) - alertType = kAlertCautionAlert; - else if (style & wxICON_HAND) - alertType = kAlertStopAlert; - else if (style & wxICON_INFORMATION) - alertType = kAlertNoteAlert; - else if (style & wxICON_QUESTION) - alertType = kAlertNoteAlert; + + switch ( GetEffectiveIcon() ) + { + case wxICON_ERROR: + alertType = kAlertStopAlert; + break; + + case wxICON_WARNING: + alertType = kAlertCautionAlert; + break; + + case wxICON_QUESTION: + case wxICON_INFORMATION: + alertType = kAlertNoteAlert; + break; + } // work out what to display