diff --git a/wxPython/.cvsignore b/wxPython/.cvsignore index 75e75a190a..8886a1a7b1 100644 --- a/wxPython/.cvsignore +++ b/wxPython/.cvsignore @@ -1,2 +1,3 @@ .emacs.desktop build.local +update.log diff --git a/wxPython/CHANGES.txt b/wxPython/CHANGES.txt index 83608f35c0..a64317d078 100644 --- a/wxPython/CHANGES.txt +++ b/wxPython/CHANGES.txt @@ -2,6 +2,13 @@ CHANGES.txt for wxPython ---------------------------------------------------------------------- +New in 2.2.1 +------------ + +Various tweaks, fixes, missing methods, etc. + + + New in 2.2.0 ------------ diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 10ed61edd0..6d5a116d18 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -70,6 +70,7 @@ class wxPythonDemo(wxFrame): style=wxDEFAULT_FRAME_STYLE|wxNO_FULL_REPAINT_ON_RESIZE) self.cwd = os.getcwd() + self.curOverview = "" if wxPlatform == '__WXMSW__': self.icon = wxIcon('bitmaps/mondrian.ico', wxBITMAP_TYPE_ICO) diff --git a/wxPython/src/gtk/events.cpp b/wxPython/src/gtk/events.cpp index 6f136bae90..32334162a2 100644 --- a/wxPython/src/gtk/events.cpp +++ b/wxPython/src/gtk/events.cpp @@ -764,8 +764,8 @@ static PyObject *_wrap_new_wxCommandEvent(PyObject *self, PyObject *args, PyObje return _resultobj; } -#define wxCommandEvent_Checked(_swigobj) (_swigobj->Checked()) -static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, PyObject *kwargs) { +#define wxCommandEvent_IsChecked(_swigobj) (_swigobj->IsChecked()) +static PyObject *_wrap_wxCommandEvent_IsChecked(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; bool _result; wxCommandEvent * _arg0; @@ -773,18 +773,18 @@ static PyObject *_wrap_wxCommandEvent_Checked(PyObject *self, PyObject *args, Py char *_kwnames[] = { "self", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_Checked",_kwnames,&_argo0)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxCommandEvent_IsChecked",_kwnames,&_argo0)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxCommandEvent_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_Checked. Expected _wxCommandEvent_p."); + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxCommandEvent_IsChecked. Expected _wxCommandEvent_p."); return NULL; } } { wxPy_BEGIN_ALLOW_THREADS; - _result = (bool )wxCommandEvent_Checked(_arg0); + _result = (bool )wxCommandEvent_IsChecked(_arg0); wxPy_END_ALLOW_THREADS; } _resultobj = Py_BuildValue("i",_result); @@ -5214,7 +5214,8 @@ static PyMethodDef eventscMethods[] = { { "wxCommandEvent_GetSelection", (PyCFunction) _wrap_wxCommandEvent_GetSelection, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetInt", (PyCFunction) _wrap_wxCommandEvent_GetInt, METH_VARARGS | METH_KEYWORDS }, { "wxCommandEvent_GetExtraLong", (PyCFunction) _wrap_wxCommandEvent_GetExtraLong, METH_VARARGS | METH_KEYWORDS }, - { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_Checked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_Checked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, + { "wxCommandEvent_IsChecked", (PyCFunction) _wrap_wxCommandEvent_IsChecked, METH_VARARGS | METH_KEYWORDS }, { "new_wxCommandEvent", (PyCFunction) _wrap_new_wxCommandEvent, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_SetCanVeto", (PyCFunction) _wrap_wxCloseEvent_SetCanVeto, METH_VARARGS | METH_KEYWORDS }, { "wxCloseEvent_GetVeto", (PyCFunction) _wrap_wxCloseEvent_GetVeto, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/events.py b/wxPython/src/gtk/events.py index e5ca31ceb0..bea61f2861 100644 --- a/wxPython/src/gtk/events.py +++ b/wxPython/src/gtk/events.py @@ -105,6 +105,9 @@ class wxCommandEventPtr(wxEventPtr): def __init__(self,this): self.this = this self.thisown = 0 + def IsChecked(self, *_args, **_kwargs): + val = apply(eventsc.wxCommandEvent_IsChecked,(self,) + _args, _kwargs) + return val def Checked(self, *_args, **_kwargs): val = apply(eventsc.wxCommandEvent_Checked,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/gtk/mdi.cpp b/wxPython/src/gtk/mdi.cpp index d1ce26ac04..0e8fb7a797 100644 --- a/wxPython/src/gtk/mdi.cpp +++ b/wxPython/src/gtk/mdi.cpp @@ -703,6 +703,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, { "_class_wxMenuBar","_wxMenuBar",0}, @@ -791,6 +792,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, { "_wxWindowDC","_class_wxWindowDC",0}, diff --git a/wxPython/src/gtk/printfw.cpp b/wxPython/src/gtk/printfw.cpp index f5c1ce43a3..5fda7ca28d 100644 --- a/wxPython/src/gtk/printfw.cpp +++ b/wxPython/src/gtk/printfw.cpp @@ -1552,13 +1552,12 @@ static PyObject *_wrap_wxPageSetupDialogData_SetMinMarginBottomRight(PyObject *s static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; wxPageSetupDialogData * _arg0; - wxPaperSize * _arg1; + wxPaperSize _arg1; PyObject * _argo0 = 0; - PyObject * _argo1 = 0; char *_kwnames[] = { "self","id", NULL }; self = self; - if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OO:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_argo1)) + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"Oi:wxPageSetupDialogData_SetPaperId",_kwnames,&_argo0,&_arg1)) return NULL; if (_argo0) { if (_argo0 == Py_None) { _arg0 = NULL; } @@ -1567,16 +1566,9 @@ static PyObject *_wrap_wxPageSetupDialogData_SetPaperId(PyObject *self, PyObject return NULL; } } - if (_argo1) { - if (_argo1 == Py_None) { _arg1 = NULL; } - else if (SWIG_GetPtrObj(_argo1,(void **) &_arg1,"_wxPaperSize_p")) { - PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of wxPageSetupDialogData_SetPaperId. Expected _wxPaperSize_p."); - return NULL; - } - } { wxPy_BEGIN_ALLOW_THREADS; - wxPageSetupDialogData_SetPaperId(_arg0,*_arg1); + wxPageSetupDialogData_SetPaperId(_arg0,_arg1); wxPy_END_ALLOW_THREADS; } Py_INCREF(Py_None); @@ -4366,6 +4358,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPrintQuality","_EBool",0}, { "_wxPrintQuality","_size_t",0}, { "_class_wxCustomDataObject","_wxCustomDataObject",0}, + { "_wxSpinCtrl","_class_wxSpinCtrl",0}, { "_wxFontData","_class_wxFontData",0}, { "_class_wxRegionIterator","_wxRegionIterator",0}, { "_class_wxPyTextDropTarget","_wxPyTextDropTarget",0}, @@ -4474,6 +4467,7 @@ static struct { char *n1; char *n2; void *(*pcnv)(void *); } _swig_mapping[] = { { "_wxPoint","_class_wxPoint",0}, { "_class_wxButton","_wxButton",0}, { "_wxRadioBox","_class_wxRadioBox",0}, + { "_class_wxSpinCtrl","_wxSpinCtrl",0}, { "_class_wxFontData","_wxFontData",0}, { "_char","_wxChar",0}, { "_wxBitmap","_class_wxBitmap",0}, diff --git a/wxPython/src/gtk/windows.cpp b/wxPython/src/gtk/windows.cpp index dc72e45fee..acf0b200c8 100644 --- a/wxPython/src/gtk/windows.cpp +++ b/wxPython/src/gtk/windows.cpp @@ -1050,6 +1050,62 @@ static PyObject *_wrap_wxWindow_CenterOnParent(PyObject *self, PyObject *args, P return _resultobj; } +#define wxWindow_CentreOnScreen(_swigobj,_swigarg0) (_swigobj->CentreOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CentreOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CentreOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CentreOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CentreOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + +#define wxWindow_CenterOnScreen(_swigobj,_swigarg0) (_swigobj->CenterOnScreen(_swigarg0)) +static PyObject *_wrap_wxWindow_CenterOnScreen(PyObject *self, PyObject *args, PyObject *kwargs) { + PyObject * _resultobj; + wxWindow * _arg0; + int _arg1 = (int ) wxBOTH; + PyObject * _argo0 = 0; + char *_kwnames[] = { "self","direction", NULL }; + + self = self; + if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O|i:wxWindow_CenterOnScreen",_kwnames,&_argo0,&_arg1)) + return NULL; + if (_argo0) { + if (_argo0 == Py_None) { _arg0 = NULL; } + else if (SWIG_GetPtrObj(_argo0,(void **) &_arg0,"_wxWindow_p")) { + PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of wxWindow_CenterOnScreen. Expected _wxWindow_p."); + return NULL; + } + } +{ + wxPy_BEGIN_ALLOW_THREADS; + wxWindow_CenterOnScreen(_arg0,_arg1); + + wxPy_END_ALLOW_THREADS; +} Py_INCREF(Py_None); + _resultobj = Py_None; + return _resultobj; +} + #define wxWindow_ClientToScreenXY(_swigobj,_swigarg0,_swigarg1) (_swigobj->ClientToScreen(_swigarg0,_swigarg1)) static PyObject *_wrap_wxWindow_ClientToScreenXY(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject * _resultobj; @@ -9135,6 +9191,8 @@ static PyMethodDef windowscMethods[] = { { "wxWindow_Close", (PyCFunction) _wrap_wxWindow_Close, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreen", (PyCFunction) _wrap_wxWindow_ClientToScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_ClientToScreenXY", (PyCFunction) _wrap_wxWindow_ClientToScreenXY, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CenterOnScreen", (PyCFunction) _wrap_wxWindow_CenterOnScreen, METH_VARARGS | METH_KEYWORDS }, + { "wxWindow_CentreOnScreen", (PyCFunction) _wrap_wxWindow_CentreOnScreen, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CenterOnParent", (PyCFunction) _wrap_wxWindow_CenterOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_CentreOnParent", (PyCFunction) _wrap_wxWindow_CentreOnParent, METH_VARARGS | METH_KEYWORDS }, { "wxWindow_Centre", (PyCFunction) _wrap_wxWindow_Centre, METH_VARARGS | METH_KEYWORDS }, diff --git a/wxPython/src/gtk/windows.py b/wxPython/src/gtk/windows.py index 3a5d0580af..935946452f 100644 --- a/wxPython/src/gtk/windows.py +++ b/wxPython/src/gtk/windows.py @@ -139,6 +139,12 @@ class wxWindowPtr(wxEvtHandlerPtr): def CenterOnParent(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_CenterOnParent,(self,) + _args, _kwargs) return val + def CentreOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CentreOnScreen,(self,) + _args, _kwargs) + return val + def CenterOnScreen(self, *_args, **_kwargs): + val = apply(windowsc.wxWindow_CenterOnScreen,(self,) + _args, _kwargs) + return val def ClientToScreenXY(self, *_args, **_kwargs): val = apply(windowsc.wxWindow_ClientToScreenXY,(self,) + _args, _kwargs) return val diff --git a/wxPython/src/mdi.i b/wxPython/src/mdi.i index abbba857e7..7d68b700d0 100644 --- a/wxPython/src/mdi.i +++ b/wxPython/src/mdi.i @@ -55,10 +55,10 @@ public: // TODO: This isn't handled by the standard event-table system... //wxMDIClientWindow* OnCreateClient(); - wxMenu* GetWindowMenu(); - void SetWindowMenu(wxMenu* menu); #ifdef __WXMSW__ + wxMenu* GetWindowMenu(); + void SetWindowMenu(wxMenu* menu); void SetToolBar(wxToolBar* toolbar); #endif void Tile();