- yes/no dialog: set default button to "no" if requested (value == 0)
This commit is contained in:
parent
c7e732fc8c
commit
c1a073bc2d
@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// $Id: wxmain.cc,v 1.146 2006-09-04 18:36:47 vruppert Exp $
|
||||
// $Id: wxmain.cc,v 1.147 2006-09-09 08:05:07 vruppert Exp $
|
||||
/////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// wxmain.cc implements the wxWidgets frame, toolbar, menus, and dialogs.
|
||||
@ -1172,9 +1172,13 @@ MyFrame::HandleAskParam(BxEvent *event)
|
||||
case BXT_PARAM_STRING:
|
||||
return HandleAskParamString((bx_param_string_c *)param);
|
||||
case BXT_PARAM_BOOL:
|
||||
((bx_param_bool_c *)param)->set(wxMessageBox(wxString(param->get_description(), wxConvUTF8),
|
||||
wxString(param->get_label(), wxConvUTF8), wxYES_NO, this) == wxYES);
|
||||
return 0;
|
||||
{
|
||||
long style = wxYES_NO;
|
||||
if (((bx_param_bool_c *)param)->get() == 0) style |= wxNO_DEFAULT;
|
||||
((bx_param_bool_c *)param)->set(wxMessageBox(wxString(param->get_description(), wxConvUTF8),
|
||||
wxString(param->get_label(), wxConvUTF8), style, this) == wxYES);
|
||||
return 0;
|
||||
}
|
||||
default:
|
||||
{
|
||||
wxString msg;
|
||||
|
Loading…
x
Reference in New Issue
Block a user