Workaround a mismatch between the wxRTTI class name and the wxPython
class name. (I should check for others...) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18648 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -598,6 +598,10 @@ wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
|
|||||||
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
||||||
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
||||||
|
|
||||||
|
# workarounds for bad wxRTTI names
|
||||||
|
wxGauge95 = wxGauge
|
||||||
|
wxGauge95Ptr = wxGaugePtr
|
||||||
|
|
||||||
|
|
||||||
wxPyAssertionError = wxc.wxPyAssertionError
|
wxPyAssertionError = wxc.wxPyAssertionError
|
||||||
|
|
||||||
|
@@ -1176,6 +1176,12 @@ public:
|
|||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
%init %{
|
||||||
|
// wxRTTI is screwed up for wxGauge on wxMSW, it uses wxGauge95 class name
|
||||||
|
wxPyPtrTypeMap_Add("wxGauge", "wxGauge95");
|
||||||
|
%}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
@@ -540,8 +540,8 @@ PyObject* wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
|
|||||||
if (! target) {
|
if (! target) {
|
||||||
// Otherwise make it the old fashioned way by making a
|
// Otherwise make it the old fashioned way by making a
|
||||||
// new shadow object and putting this pointer in it.
|
// new shadow object and putting this pointer in it.
|
||||||
wxClassInfo* info = source->GetClassInfo();
|
wxClassInfo* info = source->GetClassInfo();
|
||||||
wxChar* name = (wxChar*)info->GetClassName();
|
wxString name = info->GetClassName();
|
||||||
PyObject* klass = wxPyClassExists(name);
|
PyObject* klass = wxPyClassExists(name);
|
||||||
while (info && !klass) {
|
while (info && !klass) {
|
||||||
name = (wxChar*)info->GetBaseClassName1();
|
name = (wxChar*)info->GetBaseClassName1();
|
||||||
|
@@ -11952,6 +11952,9 @@ SWIGEXPORT(void) initcontrolsc() {
|
|||||||
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
PyDict_SetItemString(d,"cvar", SWIG_globals);
|
||||||
SWIG_addvarlink(SWIG_globals,"wxDefaultValidator",_wrap_wxDefaultValidator_get, _wrap_wxDefaultValidator_set);
|
SWIG_addvarlink(SWIG_globals,"wxDefaultValidator",_wrap_wxDefaultValidator_get, _wrap_wxDefaultValidator_set);
|
||||||
PyDict_SetItemString(d,"wxEVT_COMMAND_TOGGLEBUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOGGLEBUTTON_CLICKED));
|
PyDict_SetItemString(d,"wxEVT_COMMAND_TOGGLEBUTTON_CLICKED", PyInt_FromLong((long) wxEVT_COMMAND_TOGGLEBUTTON_CLICKED));
|
||||||
|
|
||||||
|
// wxRTTI is screwed up for wxGauge on wxMSW, it uses wxGauge95 class name
|
||||||
|
wxPyPtrTypeMap_Add("wxGauge", "wxGauge95");
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; _swig_mapping[i].n1; i++)
|
for (i = 0; _swig_mapping[i].n1; i++)
|
||||||
|
@@ -1545,6 +1545,9 @@ wxSystemSettings_GetSystemColour = wxSystemSettings_GetColour
|
|||||||
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
wxSystemSettings_GetSystemFont = wxSystemSettings_GetFont
|
||||||
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
wxSystemSettings_GetSystemMetric = wxSystemSettings_GetMetric
|
||||||
|
|
||||||
|
# workarounds for bad wxRTTI names
|
||||||
|
wxGauge95 = wxGauge
|
||||||
|
wxGauge95Ptr = wxGaugePtr
|
||||||
|
|
||||||
wxPyAssertionError = wxc.wxPyAssertionError
|
wxPyAssertionError = wxc.wxPyAssertionError
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user