X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c368d904fc27d35ae1e533155e2154dc496432e4..ad48a30eec981b8f5a3d4fa0321f746b2f66a2d4:/wxPython/src/html.i diff --git a/wxPython/src/html.i b/wxPython/src/html.i index bb4af6d866..4b5ef2274c 100644 --- a/wxPython/src/html.i +++ b/wxPython/src/html.i @@ -14,7 +14,7 @@ %module html %{ -#include "helpers.h" +#include "export.h" #include #include #include @@ -40,16 +40,6 @@ %extern utils.i -//--------------------------------------------------------------------------- - -%{ -// #ifdef __WXMSW__ -// wxString wxPyEmptyStr(""); -// wxPoint wxPyDefaultPosition(wxDefaultPosition); -// wxSize wxPyDefaultSize(wxDefaultSize); -// #endif -%} - %pragma(python) code = "import wx" @@ -275,12 +265,14 @@ public: } void OnExit() { + bool doSave = wxPyRestoreThread(); Py_DECREF(m_tagHandlerClass); m_tagHandlerClass = NULL; for (size_t x=0; x < m_objArray.GetCount(); x++) { PyObject* obj = (PyObject*)m_objArray.Item(x); Py_DECREF(obj); } + wxPySaveThread(doSave); }; void FillHandlersTable(wxHtmlWinParser *parser) { @@ -431,9 +423,10 @@ IMP_PYCALLBACK__STRING(wxPyHtmlWindow, wxHtmlWindow, OnSetTitle); void wxPyHtmlWindow::OnLinkClicked(const wxHtmlLinkInfo& link) { bool doSave = wxPyRestoreThread(); - if (m_myInst.findCallback("OnLinkClicked")) { - PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo"); - m_myInst.callCallback(Py_BuildValue("(O)", obj)); + if (wxPyCBH_findCallback(m_myInst, "OnLinkClicked")) { + PyObject* obj = wxPyConstructObject((void*)&link, "wxHtmlLinkInfo", 0); + wxPyCBH_callCallback(m_myInst, Py_BuildValue("(O)", obj)); + Py_DECREF(obj); } else wxHtmlWindow::OnLinkClicked(link); @@ -449,8 +442,8 @@ void wxPyHtmlWindow::base_OnLinkClicked(const wxHtmlLinkInfo& link) { %name(wxHtmlWindow) class wxPyHtmlWindow : public wxScrolledWindow { public: wxPyHtmlWindow(wxWindow *parent, int id = -1, - wxPoint& pos = wxPyDefaultPosition, - wxSize& size = wxPyDefaultSize, + wxPoint& pos = wxDefaultPosition, + wxSize& size = wxDefaultSize, int flags=wxHW_SCROLLBAR_AUTO, char* name = "htmlWindow"); @@ -530,7 +523,7 @@ enum { class wxHtmlPrintout : public wxPyPrintout { public: wxHtmlPrintout(const char* title = "Printout"); - ~wxHtmlPrintout(); + //~wxHtmlPrintout(); void SetHtmlText(const wxString& html, const wxString &basepath = wxEmptyString, @@ -579,9 +572,8 @@ public: inithtmlhelpc(); - //wxClassInfo::CleanUpClasses(); - //wxClassInfo::InitializeClasses(); - + wxClassInfo::CleanUpClasses(); + wxClassInfo::InitializeClasses(); %} //----------------------------------------------------------------------