X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/474c48f92ec642facb72551404955c55ac9f3fba..2403536a34a03d3bba22b55633b8d23e125b0f8a:/wxPython/src/gtk/misc.cpp diff --git a/wxPython/src/gtk/misc.cpp b/wxPython/src/gtk/misc.cpp index 6d8549ef7a..86a3f6c0a0 100644 --- a/wxPython/src/gtk/misc.cpp +++ b/wxPython/src/gtk/misc.cpp @@ -93,8 +93,6 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) { static char* wxStringErrorMsg = "String type required"; #endif - static wxString wxPyEmptyStr(""); - PyObject* wxIntersectRect(wxRect* r1, wxRect* r2) { wxRegion reg1(*r1); wxRegion reg2(*r2); @@ -399,7 +397,7 @@ static PyObject *_wrap_wxNow(PyObject *self, PyObject *args, PyObject *kwargs) { static PyObject *_wrap_wxShell(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; - wxString * _arg0 = (wxString *) &wxPyEmptyStr; + wxString * _arg0 = (wxString *) &wxEmptyString; PyObject * _obj0 = 0; char *_kwnames[] = { "command", NULL }; @@ -819,6 +817,30 @@ static PyObject *_wrap_wxGetHomeDir(PyObject *self, PyObject *args, PyObject *kw return _resultobj; } +static PyObject *_wrap_wxGetUserHome(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxString * _result; + char * _arg0 = (char *) ""; + char *_kwnames[] = { "user", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|s:wxGetUserHome",_kwnames,&_arg0)) + return NULL; +{ + PyThreadState* __tstate = wxPyBeginAllowThreads(); + _result = new wxString (wxGetUserHome(_arg0)); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) return NULL; +}{ + _resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len()); +} +{ + delete _result; +} + return _resultobj; +} + static PyObject *_wrap_wxGetAccelFromString(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxAcceleratorEntry * _result; @@ -4148,6 +4170,7 @@ static PyMethodDef misccMethods[] = { { "wxObject_Destroy", (PyCFunction) _wrap_wxObject_Destroy, METH_VARARGS | METH_KEYWORDS }, { "wxObject_GetClassName", (PyCFunction) _wrap_wxObject_GetClassName, METH_VARARGS | METH_KEYWORDS }, { "wxGetAccelFromString", (PyCFunction) _wrap_wxGetAccelFromString, METH_VARARGS | METH_KEYWORDS }, + { "wxGetUserHome", (PyCFunction) _wrap_wxGetUserHome, METH_VARARGS | METH_KEYWORDS }, { "wxGetHomeDir", (PyCFunction) _wrap_wxGetHomeDir, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserName", (PyCFunction) _wrap_wxGetUserName, METH_VARARGS | METH_KEYWORDS }, { "wxGetUserId", (PyCFunction) _wrap_wxGetUserId, METH_VARARGS | METH_KEYWORDS },