diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index ea6ceec7e4..b55f3075f5 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -6,6 +6,7 @@ CHANGES.txt for wxPython ------- Added missing wxRect methods +Add OOR support for wxApp objects too. diff --git a/wxPython/src/gtk/wx.cpp b/wxPython/src/gtk/wx.cpp index 7b5df79fc6..9f3141e83d 100644 --- a/wxPython/src/gtk/wx.cpp +++ b/wxPython/src/gtk/wx.cpp @@ -909,7 +909,6 @@ static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs PyObject * _resultobj; wxPyApp * _result; char *_kwnames[] = { NULL }; - char _ptemp[128]; self = self; if(!PyArg_ParseTupleAndKeywords(args,kwargs,":wxGetApp",_kwnames)) @@ -920,13 +919,7 @@ static PyObject *_wrap_wxGetApp(PyObject *self, PyObject *args, PyObject *kwargs wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) return NULL; -} if (_result) { - SWIG_MakePtr(_ptemp, (char *) _result,"_wxPyApp_p"); - _resultobj = Py_BuildValue("s",_ptemp); - } else { - Py_INCREF(Py_None); - _resultobj = Py_None; - } +}{ _resultobj = wxPyMake_wxObject(_result); } return _resultobj; } diff --git a/wxPython/src/gtk/wx.py b/wxPython/src/gtk/wx.py index 805d6d67e8..cb01f2e465 100644 --- a/wxPython/src/gtk/wx.py +++ b/wxPython/src/gtk/wx.py @@ -157,7 +157,6 @@ _wxSetDictionary = wxc._wxSetDictionary def wxGetApp(*_args, **_kwargs): val = apply(wxc.wxGetApp,_args,_kwargs) - if val: val = wxPyAppPtr(val) return val wxApp_CleanUp = wxc.wxApp_CleanUp diff --git a/wxPython/src/my_typemaps.i b/wxPython/src/my_typemaps.i index a2f600c108..4a3e33a01a 100644 --- a/wxPython/src/my_typemaps.i +++ b/wxPython/src/my_typemaps.i @@ -402,6 +402,8 @@ $function %typemap(python, out) wxMenu* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxValidator* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxApp* { $target = wxPyMake_wxObject($source); } +%typemap(python, out) wxPyApp* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxDC* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxFSFile* { $target = wxPyMake_wxObject($source); } %typemap(python, out) wxFileSystem* { $target = wxPyMake_wxObject($source); }