- 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;
-
-
- // work out what to display
- // if the extended text is empty then we use the caption as the title
- // and the message as the text (for backwards compatibility)
- // but if the extended message is not empty then we use the message as the title
- // and the extended message as the text because that makes more sense
+
+ switch ( GetEffectiveIcon() )
+ {
+ case wxICON_ERROR:
+ alertType = kAlertStopAlert;
+ break;
+
+ case wxICON_WARNING:
+ alertType = kAlertCautionAlert;
+ break;
+
+ case wxICON_QUESTION:
+ case wxICON_INFORMATION:
+ alertType = kAlertNoteAlert;
+ break;
+ }
+
+ // (the standard alert has two slots [title, text]
+ // for the three wxStrings [caption, message, extended message])
+ //
+ // if the extended text is empty we use the caption and
+ // the message (for backwards compatibility)
+ //
+ // if the extended text is not empty we ignore the caption
+ // and use the message and the extended message
+