]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_timer.i
Add a set for wxMac too
[wxWidgets.git] / wxPython / src / _timer.i
index 5471ca7b26df61d17cb41b7d7f3d4260576aa843..b613bbc630f10f45268695453b00d2b83ff20380 100644 (file)
@@ -36,10 +36,10 @@ enum {
 
 void wxPyTimer::Notify() {
     bool found;
-    wxPyBeginBlockThreads();
+    bool blocked = wxPyBeginBlockThreads();
     if ((found = wxPyCBH_findCallback(m_myInst, "Notify")))
         wxPyCBH_callCallback(m_myInst, Py_BuildValue("()"));
-    wxPyEndBlockThreads();
+    wxPyEndBlockThreads(blocked);
     if (! found)
         wxTimer::Notify();
 }   
@@ -56,11 +56,6 @@ void wxPyTimer::base_Notify() {
 public:
     %pythonAppend wxPyTimer         "self._setCallbackInfo(self, Timer, 0)"
 
-//     %pythonAppend wxTimer
-//     "if hasattr(self, 'Notify'):
-//             print 'bound EVT_TIMER to self.Notify'
-//             self.Bind(EVT_TIMER, self.Notify)
-//             self.SetOwner(self)";
 
     // if you don't call SetOwner() or provide an owner in the contstructor
     // then you must override Notify() inorder to receive the timer