X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dcf924a345ea8ffbc1cf6b40b5f75c6005e504c0..7b9da2077d0975db6c965a85c91d5aca671ab5e3:/src/gtk/accel.cpp diff --git a/src/gtk/accel.cpp b/src/gtk/accel.cpp index 3d161f1c31..c398e19e4c 100644 --- a/src/gtk/accel.cpp +++ b/src/gtk/accel.cpp @@ -4,7 +4,7 @@ // Author: Robert Roebling // Id: $id:$ // Copyright: (c) 1998 Robert Roebling -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ @@ -24,13 +24,12 @@ class wxAccelRefData: public wxObjectRefData { public: - - wxAccelRefData(void); - + wxAccelRefData(); + wxList m_accels; }; -wxAccelRefData::wxAccelRefData(void) +wxAccelRefData::wxAccelRefData() { m_accels.DeleteContents( TRUE ); } @@ -40,7 +39,7 @@ wxAccelRefData::wxAccelRefData(void) #define M_ACCELDATA ((wxAccelRefData *)m_refData) IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable,wxObject) - + wxAcceleratorTable::wxAcceleratorTable() { } @@ -48,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(); @@ -80,12 +79,12 @@ 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; }