]> git.saurik.com Git - wxWidgets.git/blobdiff - src/cocoa/msgdlg.mm
Brazilian Portuguese translations update from Felipe.
[wxWidgets.git] / src / cocoa / msgdlg.mm
index 3dfe3f0a15e4f5ab32d7f1d51ed75dfd55afc9ae..772ec2489de7a35f5b0fdcc7f1c0c18e4db9c936 100644 (file)
@@ -79,14 +79,17 @@ int wxCocoaMessageDialog::ShowModal()
     const long style = GetMessageDialogStyle();
 
     NSAlertStyle nsStyle = NSInformationalAlertStyle;
-    if (style & wxICON_EXCLAMATION)
-        nsStyle = NSWarningAlertStyle;
-    else if (style & wxICON_HAND)
-        nsStyle = NSCriticalAlertStyle;
-    else if (style & wxICON_INFORMATION)
-        nsStyle = NSInformationalAlertStyle;
-    else if (style & wxICON_QUESTION)
-        nsStyle = NSInformationalAlertStyle;
+
+    switch ( GetEffectiveIcon() )
+    {
+        case wxICON_ERROR:
+            nsStyle = NSCriticalAlertStyle;
+            break;
+
+        case wxICON_WARNING:
+            nsStyle = NSWarningAlertStyle;
+            break;
+    }
 
     [alert setAlertStyle:nsStyle];