X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d3c7fc996a73e9f6a83067bc28a3c5581a3fee65..3570a1c6e596c358848c77c5b37d724097340ce8:/src/mac/carbon/accel.cpp diff --git a/src/mac/carbon/accel.cpp b/src/mac/carbon/accel.cpp index 839184384c..f33bbe28e0 100644 --- a/src/mac/carbon/accel.cpp +++ b/src/mac/carbon/accel.cpp @@ -17,6 +17,8 @@ #include "wx/string.h" #endif +#ifndef __WXUNIVERSAL__ + IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) // ---------------------------------------------------------------------------- @@ -33,7 +35,7 @@ WX_DEFINE_LIST(wxAccelList) class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData { - friend class WXDLLEXPORT wxAcceleratorTable; + friend class wxAcceleratorTable; public: wxAcceleratorRefData(); virtual ~wxAcceleratorRefData(); @@ -77,7 +79,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != NULL); } @@ -91,10 +93,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(); } @@ -103,3 +105,5 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) return -1; } + +#endif \ No newline at end of file