X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8907154c1a8a6882c6797d1f16393ddfb23e7f3a..f98bd6d6cf33f0475b5d737a2968b42b7ea0009f:/src/mac/carbon/accel.cpp diff --git a/src/mac/carbon/accel.cpp b/src/mac/carbon/accel.cpp index fbda435df5..484b49e5ad 100644 --- a/src/mac/carbon/accel.cpp +++ b/src/mac/carbon/accel.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: accel.cpp +// Name: src/mac/carbon/accel.cpp // Purpose: wxAcceleratorTable // Author: Stefan Csomor // Modified by: @@ -12,7 +12,10 @@ #include "wx/wxprec.h" #include "wx/accel.h" -#include "wx/string.h" + +#ifndef WX_PRECOMP + #include "wx/string.h" +#endif IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) @@ -22,7 +25,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject) WX_DECLARE_LIST(wxAcceleratorEntry, wxAccelList); #include "wx/listimpl.cpp" -WX_DEFINE_LIST(wxAccelList); +WX_DEFINE_LIST(wxAccelList) // ---------------------------------------------------------------------------- // wxAccelRefData: the data used by wxAcceleratorTable @@ -33,7 +36,7 @@ class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData friend class WXDLLEXPORT wxAcceleratorTable; public: wxAcceleratorRefData(); - ~wxAcceleratorRefData(); + virtual ~wxAcceleratorRefData(); wxAccelList m_accels; }; @@ -74,7 +77,7 @@ wxAcceleratorTable::wxAcceleratorTable(int n, const wxAcceleratorEntry entries[] } } -bool wxAcceleratorTable::Ok() const +bool wxAcceleratorTable::IsOk() const { return (m_refData != NULL); } @@ -90,7 +93,8 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) 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() || event.MetaDown())) + (((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown()) && + (((entry->GetFlags() & wxACCEL_CMD) == 0) || event.CmdDown())) { return entry->GetCommand(); } @@ -99,5 +103,3 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) return -1; } - -