X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/119a78753d60ee80d2a95323d66bb1c7f2cc0b6b..850df2d78866c3edcf848103b5dbc7e7fa1ee5fa:/src/mac/carbon/accel.cpp?ds=sidebyside diff --git a/src/mac/carbon/accel.cpp b/src/mac/carbon/accel.cpp index 69cc8cbbe3..b221f9107c 100644 --- a/src/mac/carbon/accel.cpp +++ b/src/mac/carbon/accel.cpp @@ -33,10 +33,10 @@ WX_DEFINE_LIST(wxAccelList) class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData { - friend class WXDLLEXPORT wxAcceleratorTable; + friend class wxAcceleratorTable; public: wxAcceleratorRefData(); - ~wxAcceleratorRefData(); + virtual ~wxAcceleratorRefData(); wxAccelList m_accels; }; @@ -77,7 +77,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != NULL); } @@ -91,10 +91,10 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) { wxAcceleratorEntry *entry = node->GetData(); if ((event.m_keyCode == entry->GetKeyCode()) && - (((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) && - (((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) && - (((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown()) && - (((entry->GetFlags() & wxACCEL_CMD) == 0) || event.CmdDown())) + (((entry->GetFlags() & wxACCEL_CTRL) != 0) == event.ControlDown()) && + (((entry->GetFlags() & wxACCEL_SHIFT) != 0) == event.ShiftDown()) && + (((entry->GetFlags() & wxACCEL_ALT) != 0) == event.AltDown()) && + (((entry->GetFlags() & wxACCEL_CMD) != 0) == event.CmdDown())) { return entry->GetCommand(); }