adding support for wxCANCEL_DEFAULT
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -260,13 +260,25 @@ void* wxMessageDialog::ConstructNSAlert()
|
|||||||
// the MSW implementation even shows an OK button if it is not specified, we'll do the same
|
// the MSW implementation even shows an OK button if it is not specified, we'll do the same
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
[alert addButtonWithTitle:cfOKString.AsNSString()];
|
if ( style & wxCANCEL_DEFAULT )
|
||||||
m_buttonId[ m_buttonCount++ ] = wxID_OK;
|
|
||||||
if (style & wxCANCEL)
|
|
||||||
{
|
{
|
||||||
[alert addButtonWithTitle:cfCancelString.AsNSString()];
|
[alert addButtonWithTitle:cfCancelString.AsNSString()];
|
||||||
m_buttonId[ m_buttonCount++ ] = wxID_CANCEL;
|
m_buttonId[ m_buttonCount++ ] = wxID_CANCEL;
|
||||||
|
|
||||||
|
[alert addButtonWithTitle:cfOKString.AsNSString()];
|
||||||
|
m_buttonId[ m_buttonCount++ ] = wxID_OK;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
[alert addButtonWithTitle:cfOKString.AsNSString()];
|
||||||
|
m_buttonId[ m_buttonCount++ ] = wxID_OK;
|
||||||
|
if (style & wxCANCEL)
|
||||||
|
{
|
||||||
|
[alert addButtonWithTitle:cfCancelString.AsNSString()];
|
||||||
|
m_buttonId[ m_buttonCount++ ] = wxID_CANCEL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return alert;
|
return alert;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user