Revision: 7244
          http://svn.sourceforge.net/mahogany/?rev=7244&view=rev
Author:   vadz
Date:     2007-04-26 08:57:21 -0700 (Thu, 26 Apr 2007)

Log Message:
-----------
disallow timer events processing when we're inside c-client, should fix crashes 
when pressing a key while the headers retrieval progress dialog is shown

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

Modified: trunk/M/src/gui/wxMApp.cpp
===================================================================
--- trunk/M/src/gui/wxMApp.cpp  2007-04-24 15:58:00 UTC (rev 7243)
+++ trunk/M/src/gui/wxMApp.cpp  2007-04-26 15:57:21 UTC (rev 7244)
@@ -625,6 +625,19 @@
       return false;
    }
 
+   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
+      wxTimer * const timer = wx_static_cast(wxTimer *, 
event.GetEventObject());
+      if ( timer && timer->IsOneShot() )
+         timer->Start(-1 /* same interval as last time */, true /* one shot 
*/);
+
+      return false;
+   }
+
    // 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