Make OK button default in wxGTK wxMessageDialog by default
Under wxGTK the default button in wxMessageDialog with style wxOK was set to "Cancel", whether the wxOK_DEFAULT style was specified or not. Now it is set to "OK", as expected, and wxCANCEL_DEFAULT needs to be explicitly specified to focus the "Cancel" one. Closes https://github.com/wxWidgets/wxWidgets/pull/267
This commit is contained in:
committed by
Vadim Zeitlin
parent
7255a8fb7f
commit
a374801465
@@ -214,6 +214,8 @@ void wxMessageDialog::GTKCreateMsgDialog()
|
||||
defaultButton = GTK_RESPONSE_NO;
|
||||
else if ( m_dialogStyle & wxYES_NO )
|
||||
defaultButton = GTK_RESPONSE_YES;
|
||||
else if ( m_dialogStyle & wxOK )
|
||||
defaultButton = GTK_RESPONSE_OK;
|
||||
else // No need to change the default value, whatever it is.
|
||||
defaultButton = GTK_RESPONSE_NONE;
|
||||
|
||||
|
Reference in New Issue
Block a user