]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/helpers.cpp
All wxScrolledWindows shoudl have wxHSCROLL|wxVSCROLL now.
[wxWidgets.git] / wxPython / src / helpers.cpp
index edb5a9179120fb161ad01dbdbba9c04fbf445327..69e70b5106a5274b5ec749cd3de1538460d0c156 100644 (file)
@@ -519,7 +519,10 @@ void __wxPyPreStart(PyObject* moduleDict)
 {
 
 #ifdef __WXMSW__
 {
 
 #ifdef __WXMSW__
-//    wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF);
+//     wxCrtSetDbgFlag(_CRTDBG_LEAK_CHECK_DF
+//                     | _CRTDBG_CHECK_ALWAYS_DF
+//                     | _CRTDBG_DELAY_FREE_MEM_DF                             
+//         );
 #endif
 
 #ifdef WXP_WITH_THREAD
 #endif
 
 #ifdef WXP_WITH_THREAD
@@ -825,7 +828,6 @@ void wxPy_ReinitStockObjects(int pass)
     REINITOBJ(wxTheColourDatabase, wxColourDatabase);
 
 
     REINITOBJ(wxTheColourDatabase, wxColourDatabase);
 
 
-    REINITOBJ(wxTheClipboard, wxClipboard);
     REINITOBJ2(wxDefaultValidator, wxValidator);
     REINITOBJ2(wxNullImage, wxImage);
     REINITOBJ2(wxNullAcceleratorTable, wxAcceleratorTable);
     REINITOBJ2(wxDefaultValidator, wxValidator);
     REINITOBJ2(wxNullImage, wxImage);
     REINITOBJ2(wxNullAcceleratorTable, wxAcceleratorTable);
@@ -954,7 +956,7 @@ void wxPyPtrTypeMap_Add(const char* commonName, const char* ptrName) {
 
 
 
 
 
 
-PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
+PyObject*  wxPyMake_wxObject(wxObject* source, bool setThisOwn, bool checkEvtHandler) {
     PyObject* target = NULL;
     bool      isEvtHandler = False;
 
     PyObject* target = NULL;
     bool      isEvtHandler = False;
 
@@ -987,7 +989,7 @@ PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
                 exists = wxPyCheckSwigType(name);
             }
             if (info) {
                 exists = wxPyCheckSwigType(name);
             }
             if (info) {
-                target = wxPyConstructObject((void*)source, name, False);
+                target = wxPyConstructObject((void*)source, name, setThisOwn);
                 if (target && isEvtHandler)
                     ((wxEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
             } else {
                 if (target && isEvtHandler)
                     ((wxEvtHandler*)source)->SetClientObject(new wxPyOORClientData(target));
             } else {
@@ -1004,7 +1006,7 @@ PyObject*  wxPyMake_wxObject(wxObject* source, bool checkEvtHandler) {
 }
 
 
 }
 
 
-PyObject*  wxPyMake_wxSizer(wxSizer* source) {
+PyObject*  wxPyMake_wxSizer(wxSizer* source, bool setThisOwn) {
     PyObject* target = NULL;
 
     if (source && wxIsKindOf(source, wxSizer)) {
     PyObject* target = NULL;
 
     if (source && wxIsKindOf(source, wxSizer)) {
@@ -1019,7 +1021,7 @@ PyObject*  wxPyMake_wxSizer(wxSizer* source) {
         }
     }
     if (! target) {
         }
     }
     if (! target) {
-        target = wxPyMake_wxObject(source, False);
+        target = wxPyMake_wxObject(source, setThisOwn, False);
         if (target != Py_None)
             ((wxSizer*)source)->SetClientObject(new wxPyOORClientData(target));
     }
         if (target != Py_None)
             ((wxSizer*)source)->SetClientObject(new wxPyOORClientData(target));
     }
@@ -1324,7 +1326,7 @@ wxPyCBInputStream::wxPyCBInputStream(PyObject *r, PyObject *s, PyObject *t, bool
 
 
 wxPyCBInputStream::~wxPyCBInputStream() {
 
 
 wxPyCBInputStream::~wxPyCBInputStream() {
-    bool blocked;
+    bool blocked=false;
     if (m_block) blocked = wxPyBeginBlockThreads();
     Py_XDECREF(m_read);
     Py_XDECREF(m_seek);
     if (m_block) blocked = wxPyBeginBlockThreads();
     Py_XDECREF(m_read);
     Py_XDECREF(m_seek);
@@ -1334,7 +1336,7 @@ wxPyCBInputStream::~wxPyCBInputStream() {
 
 
 wxPyCBInputStream* wxPyCBInputStream::create(PyObject *py, bool block) {
 
 
 wxPyCBInputStream* wxPyCBInputStream::create(PyObject *py, bool block) {
-    bool blocked;
+    bool blocked=false;
     if (block) blocked = wxPyBeginBlockThreads();
 
     PyObject* read = getMethod(py, "read");
     if (block) blocked = wxPyBeginBlockThreads();
 
     PyObject* read = getMethod(py, "read");
@@ -1842,7 +1844,7 @@ PyObject* wxPy_ConvertList(wxListBase* listbase) {
     pyList = PyList_New(0);
     while (node) {
         wxObj = node->GetData();
     pyList = PyList_New(0);
     while (node) {
         wxObj = node->GetData();
-        pyObj = wxPyMake_wxObject(wxObj);
+        pyObj = wxPyMake_wxObject(wxObj,false);
         PyList_Append(pyList, pyObj);
         node = node->GetNext();
     }
         PyList_Append(pyList, pyObj);
         node = node->GetNext();
     }