]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/event.cpp
Committing in .
[wxWidgets.git] / src / common / event.cpp
index bda30d84510754958519eab6163ebad8adea2c6c..31196f57c49dac3ad37d7c649e81d884e5a66a0d 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__)
-// Some older compilers (such as EMX) cannot handle
-// #pragma interface/implementation correctly, iff
-// #pragma implementation is used in _two_ translation
-// units (as created by e.g. event.cpp compiled for
-// libwx_base and event.cpp compiled for libwx_gui_core).
-// So we must not use those pragmas for those compilers in
-// such files.
-    #pragma implementation "event.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -245,7 +234,7 @@ DEFINE_EVENT_TYPE(wxEVT_SCROLL_PAGEUP)
 DEFINE_EVENT_TYPE(wxEVT_SCROLL_PAGEDOWN)
 DEFINE_EVENT_TYPE(wxEVT_SCROLL_THUMBTRACK)
 DEFINE_EVENT_TYPE(wxEVT_SCROLL_THUMBRELEASE)
-DEFINE_EVENT_TYPE(wxEVT_SCROLL_ENDSCROLL)
+DEFINE_EVENT_TYPE(wxEVT_SCROLL_CHANGED)
 
 // Scroll events from wxWindow
 DEFINE_EVENT_TYPE(wxEVT_SCROLLWIN_TOP)
@@ -265,6 +254,7 @@ DEFINE_EVENT_TYPE(wxEVT_MOVING)
 DEFINE_EVENT_TYPE(wxEVT_CLOSE_WINDOW)
 DEFINE_EVENT_TYPE(wxEVT_END_SESSION)
 DEFINE_EVENT_TYPE(wxEVT_QUERY_END_SESSION)
+DEFINE_EVENT_TYPE(wxEVT_HIBERNATE)
 DEFINE_EVENT_TYPE(wxEVT_ACTIVATE_APP)
 DEFINE_EVENT_TYPE(wxEVT_POWER)
 DEFINE_EVENT_TYPE(wxEVT_ACTIVATE)
@@ -1043,8 +1033,10 @@ wxEvtHandler::~wxEvtHandler()
     // Remove us from wxPendingEvents if necessary.
     if(wxPendingEventsLocker)
         wxENTER_CRIT_SECT(*wxPendingEventsLocker);
-    if ( wxPendingEvents ) {
-        wxPendingEvents->DeleteObject(this);
+    if ( wxPendingEvents )
+    {
+        // Delete all occurences of this from the list of pending events
+        while (wxPendingEvents->DeleteObject(this)) { } // Do nothing
     }
     if(wxPendingEventsLocker)
         wxLEAVE_CRIT_SECT(*wxPendingEventsLocker);
@@ -1074,7 +1066,7 @@ void wxEvtHandler::ClearEventLocker()
     delete m_eventsLocker;
     m_eventsLocker = NULL;
 #endif
-};
+}
 
 #endif // wxUSE_THREADS
 
@@ -1367,7 +1359,7 @@ bool wxEvtHandler::SearchDynamicEventTable( wxEvent& event )
     }
 
     return false;
-};
+}
 
 void wxEvtHandler::DoSetClientObject( wxClientData *data )
 {