]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/timercmn.cpp
reuse Clear() instead of duplicating its code in Close()
[wxWidgets.git] / src / common / timercmn.cpp
index 7371b1ffbf22384217c2e5bd0162fddd4442b8fd..90623b23eb8666e9122262aaf9be0f09a2e3908f 100644 (file)
 // wxWin headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
-    #pragma implementation "timerbase.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -32,6 +28,7 @@
 #if wxUSE_TIMER
 
 #ifndef WX_PRECOMP
+    #include "wx/timer.h"
 #endif
 
 // ----------------------------------------------------------------------------
@@ -56,6 +53,7 @@ void wxTimerBase::Notify()
     wxCHECK_RET( m_owner, _T("wxTimer::Notify() should be overridden.") );
 
     wxTimerEvent event(m_idTimer, m_milli);
+    event.SetEventObject(this);
     (void)m_owner->ProcessEvent(event);
 }
 
@@ -83,7 +81,7 @@ bool wxTimerBase::Start(int milliseconds, bool oneShot)
 
     m_oneShot = oneShot;
 
-    return TRUE;
+    return true;
 }
 
 #endif // wxUSE_TIMER