X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d120f8391920145647ec10e84629bc21fa9f1bb..57c0af52bffc66b12b7e7b49b3a2dfdcf2d2e352:/src/motif/accel.cpp diff --git a/src/motif/accel.cpp b/src/motif/accel.cpp index 46adbcc4b6..4c87676c43 100644 --- a/src/motif/accel.cpp +++ b/src/motif/accel.cpp @@ -29,7 +29,7 @@ class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData public: wxAcceleratorRefData(); ~wxAcceleratorRefData(); - + public: int m_count; wxAcceleratorEntry* m_entries; @@ -71,13 +71,13 @@ wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[]) { wxAcceleratorRefData* data = new wxAcceleratorRefData; m_refData = data; - + data->m_count = n; data->m_entries = new wxAcceleratorEntry[n]; int i; for (i = 0; i < n; i++) data->m_entries[i] = entries[i]; - + } bool wxAcceleratorTable::Ok() const @@ -102,15 +102,15 @@ bool wxAcceleratorEntry::MatchesEvent(const wxKeyEvent& event) const bool eventCtrlDown = event.ControlDown(); bool eventShiftDown = event.ShiftDown(); int eventKeyCode = event.KeyCode(); - + bool accAltDown = ((GetFlags() & wxACCEL_ALT) == wxACCEL_ALT); bool accCtrlDown = ((GetFlags() & wxACCEL_CTRL) == wxACCEL_CTRL); bool accShiftDown = ((GetFlags() & wxACCEL_SHIFT) == wxACCEL_SHIFT); int accKeyCode = GetKeyCode(); int accKeyCode2 = GetKeyCode(); if (isascii(accKeyCode2)) - accKeyCode2 = wxToLower(accKeyCode2); - + accKeyCode2 = tolower(accKeyCode2); + return ((eventAltDown == accAltDown) && (eventCtrlDown == accCtrlDown) && (eventShiftDown == accShiftDown) && ((eventKeyCode == accKeyCode || eventKeyCode == accKeyCode2))) ;