From 3837a853c9796a69aba4355d78fc835af23fd319 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 24 Mar 2005 17:51:57 +0000 Subject: [PATCH] reSWIGged git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/contrib/gizmos/mac/gizmos.py | 4 +- wxPython/contrib/gizmos/mac/gizmos_wrap.cpp | 8 +--- wxPython/src/mac/_core.py | 21 ++++++----- wxPython/src/mac/_misc.py | 9 +++++ wxPython/src/mac/_misc_wrap.cpp | 41 +++++++++++++++++++++ wxPython/src/mac/_windows.py | 2 +- wxPython/src/mac/_windows_wrap.cpp | 14 +++++-- 7 files changed, 78 insertions(+), 21 deletions(-) diff --git a/wxPython/contrib/gizmos/mac/gizmos.py b/wxPython/contrib/gizmos/mac/gizmos.py index c3e8aad522..1ef3379e6a 100644 --- a/wxPython/contrib/gizmos/mac/gizmos.py +++ b/wxPython/contrib/gizmos/mac/gizmos.py @@ -54,10 +54,10 @@ import _core import _controls import wx __docfilter__ = wx._core.__DocFilter(globals()) -wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT -wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY DS_MANAGE_SCROLLBARS = _gizmos.DS_MANAGE_SCROLLBARS DS_DRAG_CORNER = _gizmos.DS_DRAG_CORNER +wxEVT_DYNAMIC_SASH_SPLIT = _gizmos.wxEVT_DYNAMIC_SASH_SPLIT +wxEVT_DYNAMIC_SASH_UNIFY = _gizmos.wxEVT_DYNAMIC_SASH_UNIFY class DynamicSashSplitEvent(_core.CommandEvent): """Proxy of C++ DynamicSashSplitEvent class""" def __repr__(self): diff --git a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp index 76ef6654b8..b583ffae58 100644 --- a/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp +++ b/wxPython/contrib/gizmos/mac/gizmos_wrap.cpp @@ -10140,18 +10140,14 @@ SWIGEXPORT(void) SWIG_init(void) { SWIG_addvarlink(SWIG_globals,(char*)"DynamicSashNameStr",_wrap_DynamicSashNameStr_get, _wrap_DynamicSashNameStr_set); SWIG_addvarlink(SWIG_globals,(char*)"EditableListBoxNameStr",_wrap_EditableListBoxNameStr_get, _wrap_EditableListBoxNameStr_set); SWIG_addvarlink(SWIG_globals,(char*)"TreeListCtrlNameStr",_wrap_TreeListCtrlNameStr_get, _wrap_TreeListCtrlNameStr_set); - { - PyDict_SetItemString(d,"wxEVT_DYNAMIC_SASH_SPLIT", SWIG_From_int((int)(wxEVT_DYNAMIC_SASH_SPLIT))); - } - { - PyDict_SetItemString(d,"wxEVT_DYNAMIC_SASH_UNIFY", SWIG_From_int((int)(wxEVT_DYNAMIC_SASH_UNIFY))); - } { PyDict_SetItemString(d,"DS_MANAGE_SCROLLBARS", SWIG_From_int((int)(wxDS_MANAGE_SCROLLBARS))); } { PyDict_SetItemString(d,"DS_DRAG_CORNER", SWIG_From_int((int)(wxDS_DRAG_CORNER))); } + PyDict_SetItemString(d, "wxEVT_DYNAMIC_SASH_SPLIT", PyInt_FromLong(wxEVT_DYNAMIC_SASH_SPLIT)); + PyDict_SetItemString(d, "wxEVT_DYNAMIC_SASH_UNIFY", PyInt_FromLong(wxEVT_DYNAMIC_SASH_UNIFY)); { PyDict_SetItemString(d,"EL_ALLOW_NEW", SWIG_From_int((int)(wxEL_ALLOW_NEW))); } diff --git a/wxPython/src/mac/_core.py b/wxPython/src/mac/_core.py index f50bb232c8..829091c63f 100644 --- a/wxPython/src/mac/_core.py +++ b/wxPython/src/mac/_core.py @@ -11238,18 +11238,21 @@ if RELEASE_VERSION != _core_.RELEASE_VERSION: # different on different platforms. For example, please see # http://www.alanwood.net/demos/charsetdiffs.html for differences # between the common latin/roman encodings. -import locale -import codecs -try: - default = locale.getdefaultlocale()[1] - codecs.lookup(default) -except (ValueError, LookupError): - default = _sys.getdefaultencoding() + +default = _sys.getdefaultencoding() +if default == 'ascii': + import locale + import codecs + try: + default = locale.getdefaultlocale()[1] + codecs.lookup(default) + except (ValueError, LookupError): + default = _sys.getdefaultencoding() + del locale + del codecs if default: wx.SetDefaultPyEncoding(default) del default -del locale -del codecs #---------------------------------------------------------------------------- diff --git a/wxPython/src/mac/_misc.py b/wxPython/src/mac/_misc.py index 3ed6cb61ac..7b54b0a4d8 100644 --- a/wxPython/src/mac/_misc.py +++ b/wxPython/src/mac/_misc.py @@ -241,6 +241,11 @@ class SystemOptions(_core.Object): return _misc_.SystemOptions_HasOption(*args, **kwargs) HasOption = staticmethod(HasOption) + def IsFalse(*args, **kwargs): + """IsFalse(String name) -> bool""" + return _misc_.SystemOptions_IsFalse(*args, **kwargs) + + IsFalse = staticmethod(IsFalse) class SystemOptionsPtr(SystemOptions): def __init__(self, this): @@ -271,6 +276,10 @@ def SystemOptions_HasOption(*args, **kwargs): """SystemOptions_HasOption(String name) -> bool""" return _misc_.SystemOptions_HasOption(*args, **kwargs) +def SystemOptions_IsFalse(*args, **kwargs): + """SystemOptions_IsFalse(String name) -> bool""" + return _misc_.SystemOptions_IsFalse(*args, **kwargs) + #--------------------------------------------------------------------------- diff --git a/wxPython/src/mac/_misc_wrap.cpp b/wxPython/src/mac/_misc_wrap.cpp index 94f172e719..026c59240c 100644 --- a/wxPython/src/mac/_misc_wrap.cpp +++ b/wxPython/src/mac/_misc_wrap.cpp @@ -3434,6 +3434,46 @@ static PyObject *_wrap_SystemOptions_HasOption(PyObject *, PyObject *args, PyObj } +static PyObject *_wrap_SystemOptions_IsFalse(PyObject *, PyObject *args, PyObject *kwargs) { + PyObject *resultobj; + wxString *arg1 = 0 ; + bool result; + bool temp1 = false ; + PyObject * obj0 = 0 ; + char *kwnames[] = { + (char *) "name", NULL + }; + + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:SystemOptions_IsFalse",kwnames,&obj0)) goto fail; + { + arg1 = wxString_in_helper(obj0); + if (arg1 == NULL) SWIG_fail; + temp1 = true; + } + { + PyThreadState* __tstate = wxPyBeginAllowThreads(); + result = (bool)wxSystemOptions::IsFalse((wxString const &)*arg1); + + wxPyEndAllowThreads(__tstate); + if (PyErr_Occurred()) SWIG_fail; + } + { + resultobj = result ? Py_True : Py_False; Py_INCREF(resultobj); + } + { + if (temp1) + delete arg1; + } + return resultobj; + fail: + { + if (temp1) + delete arg1; + } + return NULL; +} + + static PyObject * SystemOptions_swigregister(PyObject *, PyObject *args) { PyObject *obj; if (!PyArg_ParseTuple(args,(char*)"O", &obj)) return NULL; @@ -31455,6 +31495,7 @@ static PyMethodDef SwigMethods[] = { { (char *)"SystemOptions_GetOption", (PyCFunction) _wrap_SystemOptions_GetOption, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SystemOptions_GetOptionInt", (PyCFunction) _wrap_SystemOptions_GetOptionInt, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SystemOptions_HasOption", (PyCFunction) _wrap_SystemOptions_HasOption, METH_VARARGS | METH_KEYWORDS, NULL}, + { (char *)"SystemOptions_IsFalse", (PyCFunction) _wrap_SystemOptions_IsFalse, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"SystemOptions_swigregister", SystemOptions_swigregister, METH_VARARGS, NULL}, { (char *)"NewId", (PyCFunction) _wrap_NewId, METH_VARARGS | METH_KEYWORDS, NULL}, { (char *)"RegisterId", (PyCFunction) _wrap_RegisterId, METH_VARARGS | METH_KEYWORDS, NULL}, diff --git a/wxPython/src/mac/_windows.py b/wxPython/src/mac/_windows.py index 97a0ebdf5f..6a12621286 100644 --- a/wxPython/src/mac/_windows.py +++ b/wxPython/src/mac/_windows.py @@ -3357,7 +3357,7 @@ class MDIParentFrame(Frame): return _windows_.MDIParentFrame_GetToolBar(*args, **kwargs) def Tile(*args, **kwargs): - """Tile(self)""" + """Tile(self, int orient=HORIZONTAL)""" return _windows_.MDIParentFrame_Tile(*args, **kwargs) diff --git a/wxPython/src/mac/_windows_wrap.cpp b/wxPython/src/mac/_windows_wrap.cpp index 641e99e55f..90ce98bd40 100644 --- a/wxPython/src/mac/_windows_wrap.cpp +++ b/wxPython/src/mac/_windows_wrap.cpp @@ -17051,17 +17051,25 @@ static PyObject *_wrap_MDIParentFrame_GetToolBar(PyObject *, PyObject *args, PyO static PyObject *_wrap_MDIParentFrame_Tile(PyObject *, PyObject *args, PyObject *kwargs) { PyObject *resultobj; wxMDIParentFrame *arg1 = (wxMDIParentFrame *) 0 ; + wxOrientation arg2 = (wxOrientation) wxHORIZONTAL ; PyObject * obj0 = 0 ; + PyObject * obj1 = 0 ; char *kwnames[] = { - (char *) "self", NULL + (char *) "self",(char *) "orient", NULL }; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:MDIParentFrame_Tile",kwnames,&obj0)) goto fail; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:MDIParentFrame_Tile",kwnames,&obj0,&obj1)) goto fail; SWIG_Python_ConvertPtr(obj0, (void **)&arg1, SWIGTYPE_p_wxMDIParentFrame, SWIG_POINTER_EXCEPTION | 0); if (SWIG_arg_fail(1)) SWIG_fail; + if (obj1) { + { + arg2 = (wxOrientation)(SWIG_As_int(obj1)); + if (SWIG_arg_fail(2)) SWIG_fail; + } + } { PyThreadState* __tstate = wxPyBeginAllowThreads(); - (arg1)->Tile(); + (arg1)->Tile((wxOrientation )arg2); wxPyEndAllowThreads(__tstate); if (PyErr_Occurred()) SWIG_fail; -- 2.45.2