X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d120f8391920145647ec10e84629bc21fa9f1bb..818503a1826c8d32340234318afe6de35f756c2f:/src/motif/accel.cpp diff --git a/src/motif/accel.cpp b/src/motif/accel.cpp index 46adbcc4b6..d90a47b958 100644 --- a/src/motif/accel.cpp +++ b/src/motif/accel.cpp @@ -19,9 +19,7 @@ #include "wx/utils.h" #include -#if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) -#endif class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData { @@ -29,7 +27,7 @@ class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData public: wxAcceleratorRefData(); ~wxAcceleratorRefData(); - + public: int m_count; wxAcceleratorEntry* m_entries; @@ -61,7 +59,7 @@ wxAcceleratorTable::~wxAcceleratorTable() } // Load from .rc resource -wxAcceleratorTable::wxAcceleratorTable(const wxString& resource) +wxAcceleratorTable::wxAcceleratorTable(const wxString& WXUNUSED(resource)) { m_refData = new wxAcceleratorRefData; } @@ -71,13 +69,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 +100,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))) ;