X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bbe0af5b15f8b8e95ed45abc2140fb3a1fac3c87..79f585d90388128f9d245f7c92d3013b98b9ed14:/src/gtk1/accel.cpp?ds=sidebyside diff --git a/src/gtk1/accel.cpp b/src/gtk1/accel.cpp index b15ece7379..9b861acb20 100644 --- a/src/gtk1/accel.cpp +++ b/src/gtk1/accel.cpp @@ -2,9 +2,9 @@ // Name: accel.cpp // Purpose: // Author: Robert Roebling -// Id: $id$ +// Id: $id:$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -13,14 +13,9 @@ #include "wx/accel.h" -#include +#if wxUSE_ACCEL -#ifdef __WXDEBUG__ -#ifdef NULL -#undef NULL -#endif -#define NULL ((void*)0L) -#endif +#include //----------------------------------------------------------------------------- // wxAcceleratorTable @@ -29,13 +24,12 @@ class wxAccelRefData: public wxObjectRefData { public: - - wxAccelRefData(void); - - wxList m_accels; + wxAccelRefData(); + + wxList m_accels; }; -wxAccelRefData::wxAccelRefData(void) +wxAccelRefData::wxAccelRefData() { m_accels.DeleteContents( TRUE ); } @@ -45,7 +39,7 @@ wxAccelRefData::wxAccelRefData(void) #define M_ACCELDATA ((wxAccelRefData *)m_refData) IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable,wxObject) - + wxAcceleratorTable::wxAcceleratorTable() { } @@ -53,7 +47,7 @@ wxAcceleratorTable::wxAcceleratorTable() wxAcceleratorTable::wxAcceleratorTable( int n, wxAcceleratorEntry entries[] ) { m_refData = new wxAccelRefData(); - + for (int i = 0; i < n; i++) { int flag = entries[i].GetFlags(); @@ -85,12 +79,13 @@ int wxAcceleratorTable::GetCommand( wxKeyEvent &event ) (((entry->GetFlags() & wxACCEL_CTRL) == 0) || event.ControlDown()) && (((entry->GetFlags() & wxACCEL_SHIFT) == 0) || event.ShiftDown()) && (((entry->GetFlags() & wxACCEL_ALT) == 0) || event.AltDown() || event.MetaDown())) - { + { return entry->GetCommand(); - } + } node = node->Next(); } - + return -1; } +#endif