Revision: 7289
          http://svn.sourceforge.net/mahogany/?rev=7289&view=rev
Author:   vadz
Date:     2007-06-16 17:08:21 -0700 (Sat, 16 Jun 2007)

Log Message:
-----------
use wxTimerEvent::GetTimer() with wx 2.9+ instead of wxEvent::GetEventObject() 
which doesn't always return a timer

Modified Paths:
--------------
    trunk/M/src/gui/wxMApp.cpp

Modified: trunk/M/src/gui/wxMApp.cpp
===================================================================
--- trunk/M/src/gui/wxMApp.cpp  2007-06-17 00:03:12 UTC (rev 7288)
+++ trunk/M/src/gui/wxMApp.cpp  2007-06-17 00:08:21 UTC (rev 7289)
@@ -625,21 +625,22 @@
       return false;
    }
 
-   // GetTimer() is new
-#if wxCHECK_VERSION(2, 9, 0)
    if ( event.GetEventType() == wxEVT_TIMER )
    {
       // this one should also be ignored right now as we could call to c-client
       // from its handler too, but there is an added complication: if it was a
       // one shot timer event, we need to restart the timer to avoid losing the
-      // event entirely
+      // event entirely (and unfortunately we can't do this with earlier wx
+      // versions as they don't have wxTimerEvent::GetTimer() and so we can't
+      // recover the timer object from here)
+#if wxCHECK_VERSION(2, 9, 0)
       wxTimer& timer = wx_static_cast(wxTimerEvent&, event).GetTimer();
       if ( timer.IsOneShot() )
          timer.Start(-1 /* same interval as last time */, true /* one shot */);
+#endif // wx 2.9.0
 
       return false;
    }
-#endif // wx 2.9.0
 
    // the other events should be safe to handle
    return -1;


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates

Reply via email to