]> git.saurik.com Git - wxWidgets.git/commitdiff
move default button handling code from wxControlContainer to wxTLW (patch 1524441)
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 25 Jul 2006 01:31:13 +0000 (01:31 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 25 Jul 2006 01:31:13 +0000 (01:31 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/include/wx/wxPython/pyclasses.h
wxPython/src/_evthandler.i
wxPython/src/_timer.i

index ea8bc0fe34e1aa011e2510b83f64da04794c3d94..eeefbf7527cf2cf346cbee6be108182737bea07b 100644 (file)
@@ -80,7 +80,8 @@ class wxPyTimer : public wxTimer
 {
 public:
     wxPyTimer(wxEvtHandler *owner=NULL, int id = -1);
-
+    ~wxPyTimer();
+    
     DEC_PYCALLBACK__(Notify);
     PYPRIVATE;
     DECLARE_ABSTRACT_CLASS(wxPyTimer)
index 3dd673a315165ac43a3a424fe75a835418877b00..afff9bc4451f65666960ea549e340d6a1e5cae18 100644 (file)
@@ -73,7 +73,7 @@ public:
         }
     }
 
-    %pythonAppend _setOORInfo   "args[0].thisown = 0";
+    %pythonAppend _setOORInfo   "args[0].this.own(False)";
     %extend {
         void _setOORInfo(PyObject* _self, bool incref=true) {
             if (_self && _self != Py_None) {
index 70dc914acfd327d660078192d6e76aa3016e7df8..3f227d5d376abf89f695c2735fd986fb6c2d0a20 100644 (file)
@@ -42,6 +42,12 @@ wxPyTimer::wxPyTimer(wxEvtHandler *owner, int id)
     if (owner == NULL)
         SetOwner(this);
 }
+
+wxPyTimer::~wxPyTimer()
+{
+//    printf("-=* ~wxPyTimer\n");
+}
+
 %}
 
 
@@ -55,7 +61,7 @@ public:
     // there won't be a reference cycle and it can clean itself up via normal
     // Python refcounting
     %pythonAppend wxPyTimer
-        "self._setOORInfo(self, 0);" setCallbackInfo(Timer); 
+        "self._setOORInfo(self,0); self.this.own(True); " setCallbackInfo(Timer); 
 
     // if you don't call SetOwner() or provide an owner in the ctor
     // then you must override Notify() in order to receive the timer