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.
See https://github.com/wxWidgets/wxWidgets/pull/267
(cherry picked from commit a374801465
)
This commit is contained in:
committed by
Vadim Zeitlin
parent
f2c95c1d5c
commit
fe7186ce88
@@ -266,6 +266,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