allow untranslated accelerators, too

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@20665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-05-19 16:45:47 +00:00
parent 6f5d76722b
commit af8b8aa277

View File

@@ -94,11 +94,11 @@ wxAcceleratorEntry *wxGetAccelFromString(const wxString& label)
wxString current; wxString current;
for ( size_t n = (size_t)posTab + 1; n < label.Len(); n++ ) { for ( size_t n = (size_t)posTab + 1; n < label.Len(); n++ ) {
if ( (label[n] == '+') || (label[n] == '-') ) { if ( (label[n] == '+') || (label[n] == '-') ) {
if ( current == _("ctrl") ) if ( current == _("ctrl") || current == _T("ctrl") )
accelFlags |= wxACCEL_CTRL; accelFlags |= wxACCEL_CTRL;
else if ( current == _("alt") ) else if ( current == _("alt") || current == _T("alt") )
accelFlags |= wxACCEL_ALT; accelFlags |= wxACCEL_ALT;
else if ( current == _("shift") ) else if ( current == _("shift") || current == _T("shift") )
accelFlags |= wxACCEL_SHIFT; accelFlags |= wxACCEL_SHIFT;
else { else {
// we may have "Ctrl-+", for example, but we still want to // we may have "Ctrl-+", for example, but we still want to