Changes to match cvs update
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15080 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -13,7 +13,7 @@ from my_distutils import run_swig, contrib_copy_tree
|
||||
# flags and values that affect this script
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
VERSION = "2.3.3pre2"
|
||||
VERSION = "2.3.3pre3"
|
||||
DESCRIPTION = "Cross platform GUI toolkit for Python"
|
||||
AUTHOR = "Robin Dunn"
|
||||
AUTHOR_EMAIL = "Robin Dunn <robin@alldunn.com>"
|
||||
|
@@ -1 +1 @@
|
||||
ver = '2.3.3pre2'
|
||||
ver = '2.3.3pre3'
|
||||
|
@@ -451,6 +451,8 @@ enum {
|
||||
wxPD_ESTIMATED_TIME,
|
||||
wxPD_REMAINING_TIME,
|
||||
|
||||
wxDD_NEW_DIR_BUTTON,
|
||||
|
||||
wxMENU_TEAROFF,
|
||||
wxMB_DOCKABLE,
|
||||
wxNO_FULL_REPAINT_ON_RESIZE,
|
||||
|
@@ -649,6 +649,8 @@ def wxPyTypeCast(obj, typeStr):
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
class wxPyDeadObjectError(AttributeError):
|
||||
pass
|
||||
|
||||
class _wxPyDeadObject:
|
||||
"""
|
||||
@@ -656,15 +658,21 @@ class _wxPyDeadObject:
|
||||
changed to this class when the C++ object is deleted. This should help
|
||||
prevent crashes due to referencing a bogus C++ pointer.
|
||||
"""
|
||||
reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
|
||||
attrStr = "The C++ %s object has been deleted, attribute access no longer allowed."
|
||||
|
||||
def __repr__( self ):
|
||||
if not hasattr(self, "_name"):
|
||||
self._name = "[unknown]"
|
||||
return 'wxPython wrapper for deleted %s object!!! Programming logic error' % self._name
|
||||
return self.reprStr % self._name
|
||||
|
||||
def __getattr__( self, *args ):
|
||||
if not hasattr(self, "_name"):
|
||||
self._name = "[unknown]"
|
||||
raise ValueError, 'Attempt to access attribute of a deleted %s object' % self._name
|
||||
raise wxPyDeadObjectError( self.attrStr % self._name )
|
||||
|
||||
def __nonzero__(self):
|
||||
return 0
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
@@ -1325,7 +1325,7 @@ enum {
|
||||
wxDIRCTRL_SELECT_FIRST,
|
||||
wxDIRCTRL_SHOW_FILTERS,
|
||||
wxDIRCTRL_3D_INTERNAL,
|
||||
wxDIRCTRL_EDITABLE,
|
||||
wxDIRCTRL_EDIT_LABELS,
|
||||
|
||||
wxID_TREECTRL,
|
||||
wxID_FILTERLISTCTRL,
|
||||
|
@@ -71,9 +71,11 @@ public:
|
||||
|
||||
%addmethods {
|
||||
PyObject* asTuple() {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
|
||||
@@ -112,9 +114,11 @@ public:
|
||||
self->y = y;
|
||||
}
|
||||
PyObject* asTuple() {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
|
||||
@@ -160,9 +164,11 @@ public:
|
||||
self->y = y;
|
||||
}
|
||||
PyObject* asTuple() {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
|
||||
@@ -232,11 +238,13 @@ public:
|
||||
|
||||
%addmethods {
|
||||
PyObject* asTuple() {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(4);
|
||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
|
||||
PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(self->width));
|
||||
PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
|
||||
|
@@ -55,7 +55,7 @@
|
||||
// Put some wx default wxChar* values into wxStrings.
|
||||
DECLARE_DEF_STRING(FileSelectorPromptStr);
|
||||
DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr);
|
||||
|
||||
DECLARE_DEF_STRING(DirSelectorPromptStr);
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
%}
|
||||
|
||||
@@ -83,6 +83,13 @@ wxString wxSaveFileSelector(const wxString& what,
|
||||
const wxString& default_name = wxPyEmptyString,
|
||||
wxWindow *parent = NULL);
|
||||
|
||||
|
||||
wxString wxDirSelector(const wxString& message = wxPyDirSelectorPromptStr,
|
||||
const wxString& defaultPath = wxPyEmptyString,
|
||||
long style = wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER | wxDD_NEW_DIR_BUTTON,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
wxWindow *parent = NULL);
|
||||
|
||||
wxString wxGetTextFromUser(const wxString& message,
|
||||
const wxString& caption = wxPyEmptyString,
|
||||
const wxString& default_value = wxPyEmptyString,
|
||||
|
@@ -11381,7 +11381,7 @@ SWIGEXPORT(void) initcontrols2c() {
|
||||
PyDict_SetItemString(d,"wxDIRCTRL_SELECT_FIRST", PyInt_FromLong((long) wxDIRCTRL_SELECT_FIRST));
|
||||
PyDict_SetItemString(d,"wxDIRCTRL_SHOW_FILTERS", PyInt_FromLong((long) wxDIRCTRL_SHOW_FILTERS));
|
||||
PyDict_SetItemString(d,"wxDIRCTRL_3D_INTERNAL", PyInt_FromLong((long) wxDIRCTRL_3D_INTERNAL));
|
||||
PyDict_SetItemString(d,"wxDIRCTRL_EDITABLE", PyInt_FromLong((long) wxDIRCTRL_EDITABLE));
|
||||
PyDict_SetItemString(d,"wxDIRCTRL_EDIT_LABELS", PyInt_FromLong((long) wxDIRCTRL_EDIT_LABELS));
|
||||
PyDict_SetItemString(d,"wxID_TREECTRL", PyInt_FromLong((long) wxID_TREECTRL));
|
||||
PyDict_SetItemString(d,"wxID_FILTERLISTCTRL", PyInt_FromLong((long) wxID_FILTERLISTCTRL));
|
||||
|
||||
|
@@ -1433,6 +1433,6 @@ wxDIRCTRL_DIR_ONLY = controls2c.wxDIRCTRL_DIR_ONLY
|
||||
wxDIRCTRL_SELECT_FIRST = controls2c.wxDIRCTRL_SELECT_FIRST
|
||||
wxDIRCTRL_SHOW_FILTERS = controls2c.wxDIRCTRL_SHOW_FILTERS
|
||||
wxDIRCTRL_3D_INTERNAL = controls2c.wxDIRCTRL_3D_INTERNAL
|
||||
wxDIRCTRL_EDITABLE = controls2c.wxDIRCTRL_EDITABLE
|
||||
wxDIRCTRL_EDIT_LABELS = controls2c.wxDIRCTRL_EDIT_LABELS
|
||||
wxID_TREECTRL = controls2c.wxID_TREECTRL
|
||||
wxID_FILTERLISTCTRL = controls2c.wxID_FILTERLISTCTRL
|
||||
|
@@ -1401,9 +1401,11 @@ static PyObject *_wrap_wxSize_SetHeight(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
|
||||
static PyObject * wxSize_asTuple(wxSize *self) {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
static PyObject *_wrap_wxSize_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
@@ -1671,9 +1673,11 @@ static PyObject *_wrap_wxRealPoint_Set(PyObject *self, PyObject *args, PyObject
|
||||
}
|
||||
|
||||
static PyObject * wxRealPoint_asTuple(wxRealPoint *self) {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
static PyObject *_wrap_wxRealPoint_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
@@ -2021,9 +2025,11 @@ static PyObject *_wrap_wxPoint_Set(PyObject *self, PyObject *args, PyObject *kwa
|
||||
}
|
||||
|
||||
static PyObject * wxPoint_asTuple(wxPoint *self) {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(2);
|
||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
static PyObject *_wrap_wxPoint_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
@@ -3007,11 +3013,13 @@ static PyObject *_wrap_wxRect_height_get(PyObject *self, PyObject *args, PyObjec
|
||||
}
|
||||
|
||||
static PyObject * wxRect_asTuple(wxRect *self) {
|
||||
wxPyBeginBlockThreads();
|
||||
PyObject* tup = PyTuple_New(4);
|
||||
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
|
||||
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
|
||||
PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(self->width));
|
||||
PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height));
|
||||
wxPyEndBlockThreads();
|
||||
return tup;
|
||||
}
|
||||
static PyObject *_wrap_wxRect_asTuple(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
|
@@ -103,7 +103,7 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
// Put some wx default wxChar* values into wxStrings.
|
||||
DECLARE_DEF_STRING(FileSelectorPromptStr);
|
||||
DECLARE_DEF_STRING(FileSelectorDefaultWildcardStr);
|
||||
|
||||
DECLARE_DEF_STRING(DirSelectorPromptStr);
|
||||
static const wxString wxPyEmptyString(wxT(""));
|
||||
|
||||
int wxCaret_GetBlinkTime() {
|
||||
@@ -515,6 +515,76 @@ static PyObject *_wrap_wxSaveFileSelector(PyObject *self, PyObject *args, PyObje
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxDirSelector(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
wxString * _arg0 = (wxString *) &wxPyDirSelectorPromptStr;
|
||||
wxString * _arg1 = (wxString *) &wxPyEmptyString;
|
||||
long _arg2 = (long ) wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxDD_NEW_DIR_BUTTON;
|
||||
wxPoint * _arg3 = (wxPoint *) &wxDefaultPosition;
|
||||
wxWindow * _arg4 = (wxWindow *) NULL;
|
||||
PyObject * _obj0 = 0;
|
||||
PyObject * _obj1 = 0;
|
||||
wxPoint temp;
|
||||
PyObject * _obj3 = 0;
|
||||
PyObject * _argo4 = 0;
|
||||
char *_kwnames[] = { "message","defaultPath","style","pos","parent", NULL };
|
||||
|
||||
self = self;
|
||||
if(!PyArg_ParseTupleAndKeywords(args,kwargs,"|OOlOO:wxDirSelector",_kwnames,&_obj0,&_obj1,&_arg2,&_obj3,&_argo4))
|
||||
return NULL;
|
||||
if (_obj0)
|
||||
{
|
||||
_arg0 = wxString_in_helper(_obj0);
|
||||
if (_arg0 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
if (_obj1)
|
||||
{
|
||||
_arg1 = wxString_in_helper(_obj1);
|
||||
if (_arg1 == NULL)
|
||||
return NULL;
|
||||
}
|
||||
if (_obj3)
|
||||
{
|
||||
_arg3 = &temp;
|
||||
if (! wxPoint_helper(_obj3, &_arg3))
|
||||
return NULL;
|
||||
}
|
||||
if (_argo4) {
|
||||
if (_argo4 == Py_None) { _arg4 = NULL; }
|
||||
else if (SWIG_GetPtrObj(_argo4,(void **) &_arg4,"_wxWindow_p")) {
|
||||
PyErr_SetString(PyExc_TypeError,"Type error in argument 5 of wxDirSelector. Expected _wxWindow_p.");
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
{
|
||||
PyThreadState* __tstate = wxPyBeginAllowThreads();
|
||||
_result = new wxString (wxDirSelector(*_arg0,*_arg1,_arg2,*_arg3,_arg4));
|
||||
|
||||
wxPyEndAllowThreads(__tstate);
|
||||
if (PyErr_Occurred()) return NULL;
|
||||
}{
|
||||
#if wxUSE_UNICODE
|
||||
_resultobj = PyUnicode_FromUnicode(_result->c_str(), _result->Len());
|
||||
#else
|
||||
_resultobj = PyString_FromStringAndSize(_result->c_str(), _result->Len());
|
||||
#endif
|
||||
}
|
||||
{
|
||||
if (_obj0)
|
||||
delete _arg0;
|
||||
}
|
||||
{
|
||||
if (_obj1)
|
||||
delete _arg1;
|
||||
}
|
||||
{
|
||||
delete _result;
|
||||
}
|
||||
return _resultobj;
|
||||
}
|
||||
|
||||
static PyObject *_wrap_wxGetTextFromUser(PyObject *self, PyObject *args, PyObject *kwargs) {
|
||||
PyObject * _resultobj;
|
||||
wxString * _result;
|
||||
@@ -10056,6 +10126,7 @@ static PyMethodDef misc2cMethods[] = {
|
||||
{ "wxGetSingleChoice", (PyCFunction) _wrap_wxGetSingleChoice, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGetPasswordFromUser", (PyCFunction) _wrap_wxGetPasswordFromUser, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxGetTextFromUser", (PyCFunction) _wrap_wxGetTextFromUser, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxDirSelector", (PyCFunction) _wrap_wxDirSelector, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxSaveFileSelector", (PyCFunction) _wrap_wxSaveFileSelector, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxLoadFileSelector", (PyCFunction) _wrap_wxLoadFileSelector, METH_VARARGS | METH_KEYWORDS },
|
||||
{ "wxFileSelector", (PyCFunction) _wrap_wxFileSelector, METH_VARARGS | METH_KEYWORDS },
|
||||
|
@@ -963,6 +963,8 @@ wxLoadFileSelector = misc2c.wxLoadFileSelector
|
||||
|
||||
wxSaveFileSelector = misc2c.wxSaveFileSelector
|
||||
|
||||
wxDirSelector = misc2c.wxDirSelector
|
||||
|
||||
wxGetTextFromUser = misc2c.wxGetTextFromUser
|
||||
|
||||
wxGetPasswordFromUser = misc2c.wxGetPasswordFromUser
|
||||
|
@@ -2129,6 +2129,7 @@ SWIGEXPORT(void) initwxc() {
|
||||
PyDict_SetItemString(d,"wxPD_ELAPSED_TIME", PyInt_FromLong((long) wxPD_ELAPSED_TIME));
|
||||
PyDict_SetItemString(d,"wxPD_ESTIMATED_TIME", PyInt_FromLong((long) wxPD_ESTIMATED_TIME));
|
||||
PyDict_SetItemString(d,"wxPD_REMAINING_TIME", PyInt_FromLong((long) wxPD_REMAINING_TIME));
|
||||
PyDict_SetItemString(d,"wxDD_NEW_DIR_BUTTON", PyInt_FromLong((long) wxDD_NEW_DIR_BUTTON));
|
||||
PyDict_SetItemString(d,"wxMENU_TEAROFF", PyInt_FromLong((long) wxMENU_TEAROFF));
|
||||
PyDict_SetItemString(d,"wxMB_DOCKABLE", PyInt_FromLong((long) wxMB_DOCKABLE));
|
||||
PyDict_SetItemString(d,"wxNO_FULL_REPAINT_ON_RESIZE", PyInt_FromLong((long) wxNO_FULL_REPAINT_ON_RESIZE));
|
||||
|
@@ -415,6 +415,7 @@ wxPD_CAN_ABORT = wxc.wxPD_CAN_ABORT
|
||||
wxPD_ELAPSED_TIME = wxc.wxPD_ELAPSED_TIME
|
||||
wxPD_ESTIMATED_TIME = wxc.wxPD_ESTIMATED_TIME
|
||||
wxPD_REMAINING_TIME = wxc.wxPD_REMAINING_TIME
|
||||
wxDD_NEW_DIR_BUTTON = wxc.wxDD_NEW_DIR_BUTTON
|
||||
wxMENU_TEAROFF = wxc.wxMENU_TEAROFF
|
||||
wxMB_DOCKABLE = wxc.wxMB_DOCKABLE
|
||||
wxNO_FULL_REPAINT_ON_RESIZE = wxc.wxNO_FULL_REPAINT_ON_RESIZE
|
||||
@@ -1556,6 +1557,8 @@ def wxPyTypeCast(obj, typeStr):
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
class wxPyDeadObjectError(AttributeError):
|
||||
pass
|
||||
|
||||
class _wxPyDeadObject:
|
||||
"""
|
||||
@@ -1563,15 +1566,21 @@ class _wxPyDeadObject:
|
||||
changed to this class when the C++ object is deleted. This should help
|
||||
prevent crashes due to referencing a bogus C++ pointer.
|
||||
"""
|
||||
reprStr = "wxPython wrapper for DELETED %s object! (The C++ object no longer exists.)"
|
||||
attrStr = "The C++ %s object has been deleted, attribute access no longer allowed."
|
||||
|
||||
def __repr__( self ):
|
||||
if not hasattr(self, "_name"):
|
||||
self._name = "[unknown]"
|
||||
return 'wxPython wrapper for deleted %s object!!! Programming logic error' % self._name
|
||||
return self.reprStr % self._name
|
||||
|
||||
def __getattr__( self, *args ):
|
||||
if not hasattr(self, "_name"):
|
||||
self._name = "[unknown]"
|
||||
raise ValueError, 'Attempt to access attribute of a deleted %s object' % self._name
|
||||
raise wxPyDeadObjectError( self.attrStr % self._name )
|
||||
|
||||
def __nonzero__(self):
|
||||
return 0
|
||||
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
|
@@ -12,6 +12,7 @@
|
||||
|
||||
%module wx
|
||||
|
||||
|
||||
%{
|
||||
#include "helpers.h"
|
||||
%}
|
||||
|
Reference in New Issue
Block a user