X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/23e00c551b1d9b109a0f82ae2906dea0cd4718c2..4ea366746bb0fdc232e5d44b5fc2938324a9d366:/src/cocoa/msgdlg.mm?ds=inline diff --git a/src/cocoa/msgdlg.mm b/src/cocoa/msgdlg.mm index fce905f6ba..772ec2489d 100644 --- a/src/cocoa/msgdlg.mm +++ b/src/cocoa/msgdlg.mm @@ -63,7 +63,7 @@ wxCocoaMessageDialog::wxCocoaMessageDialog(wxWindow *parent, m_cocoaNSView = nil; } -void wxCocoaMessageDialog::DoSetCustomLabel(wxString& var, const wxString& value) +void wxCocoaMessageDialog::DoSetCustomLabel(wxString& var, const ButtonLabel& value) { wxMessageDialogWithCustomLabels::DoSetCustomLabel(var, value); @@ -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];