add wxCANCEL_DEFAULT support
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
72513c369e
commit
24689293df
@ -208,10 +208,16 @@ void wxMessageDialog::GTKCreateMsgDialog()
|
||||
}
|
||||
}
|
||||
|
||||
gtk_dialog_set_default_response(dlg,
|
||||
m_dialogStyle & wxNO_DEFAULT
|
||||
? GTK_RESPONSE_NO
|
||||
: GTK_RESPONSE_YES);
|
||||
// it'd probably be harmless to call gtk_dialog_set_default_response()
|
||||
// twice but why do it if we're going to change the default below
|
||||
// anyhow
|
||||
if ( !(m_dialogStyle & wxCANCEL_DEFAULT) )
|
||||
{
|
||||
gtk_dialog_set_default_response(dlg,
|
||||
m_dialogStyle & wxNO_DEFAULT
|
||||
? GTK_RESPONSE_NO
|
||||
: GTK_RESPONSE_YES);
|
||||
}
|
||||
}
|
||||
else if ( addButtons ) // Ok or Ok/Cancel dialog
|
||||
{
|
||||
@ -222,6 +228,11 @@ void wxMessageDialog::GTKCreateMsgDialog()
|
||||
GTK_RESPONSE_CANCEL);
|
||||
}
|
||||
}
|
||||
|
||||
if ( m_dialogStyle & wxCANCEL_DEFAULT )
|
||||
{
|
||||
gtk_dialog_set_default_response(dlg, GTK_RESPONSE_CANCEL);
|
||||
}
|
||||
}
|
||||
|
||||
int wxMessageDialog::ShowModal()
|
||||
|
Loading…
Reference in New Issue
Block a user