X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/036933194c5929a106fce2e7cbd0f4f669140dd8..c89d41600b3fd4e61893cf69bec4e44f14b5f9e3:/src/html/htmlwin.cpp diff --git a/src/html/htmlwin.cpp b/src/html/htmlwin.cpp index b2ddf59492..c51d80c296 100644 --- a/src/html/htmlwin.cpp +++ b/src/html/htmlwin.cpp @@ -203,6 +203,11 @@ wxHtmlWindow::~wxHtmlWindow() if (m_Cell) delete m_Cell; + if ( m_Processors ) + { + WX_CLEAR_LIST(wxHtmlProcessorList, *m_Processors); + } + delete m_Parser; delete m_FS; delete m_History; @@ -248,11 +253,11 @@ bool wxHtmlWindow::SetPage(const wxString& source) // pass HTML through registered processors: if (m_Processors || m_GlobalProcessors) { - wxHtmlProcessorList::Node *nodeL, *nodeG; + wxHtmlProcessorList::compatibility_iterator nodeL, nodeG; int prL, prG; - nodeL = (m_Processors) ? m_Processors->GetFirst() : NULL; - nodeG = (m_GlobalProcessors) ? m_GlobalProcessors->GetFirst() : NULL; + nodeL = (m_Processors) ? m_Processors->GetFirst() : wxHtmlProcessorList::compatibility_iterator(); + nodeG = (m_GlobalProcessors) ? m_GlobalProcessors->GetFirst() : wxHtmlProcessorList::compatibility_iterator(); // VS: there are two lists, global and local, both of them sorted by // priority. Since we have to go through _both_ lists with @@ -374,7 +379,7 @@ bool wxHtmlWindow::LoadPage(const wxString& location) else { - wxNode *node; + wxList::compatibility_iterator node; wxString src = wxEmptyString; if (m_RelatedStatusBar != -1) @@ -653,9 +658,8 @@ void wxHtmlWindow::AddProcessor(wxHtmlProcessor *processor) if (!m_Processors) { m_Processors = new wxHtmlProcessorList; - m_Processors->DeleteContents(TRUE); } - wxHtmlProcessorList::Node *node; + wxHtmlProcessorList::compatibility_iterator node; for (node = m_Processors->GetFirst(); node; node = node->GetNext()) { @@ -673,9 +677,8 @@ void wxHtmlWindow::AddProcessor(wxHtmlProcessor *processor) if (!m_GlobalProcessors) { m_GlobalProcessors = new wxHtmlProcessorList; - m_GlobalProcessors->DeleteContents(TRUE); } - wxHtmlProcessorList::Node *node; + wxHtmlProcessorList::compatibility_iterator node; for (node = m_GlobalProcessors->GetFirst(); node; node = node->GetNext()) { @@ -697,8 +700,9 @@ wxHtmlProcessorList *wxHtmlWindow::m_GlobalProcessors = NULL; void wxHtmlWindow::CleanUpStatics() { wxDELETE(m_DefaultFilter); - m_Filters.DeleteContents(TRUE); - m_Filters.Clear(); + WX_CLEAR_LIST(wxList, m_Filters); + if (m_GlobalProcessors) + WX_CLEAR_LIST(wxHtmlProcessorList, *m_GlobalProcessors); wxDELETE(m_GlobalProcessors); } @@ -964,8 +968,10 @@ void wxHtmlWindow::OnMouseUp(wxMouseEvent& event) -void wxHtmlWindow::OnIdle(wxIdleEvent& WXUNUSED(event)) -{ +void wxHtmlWindow::OnInternalIdle() +{ + wxWindow::OnInternalIdle(); + if (m_tmpMouseMoved && (m_Cell != NULL)) { #ifdef DEBUG_HTML_SELECTION @@ -1312,7 +1318,6 @@ BEGIN_EVENT_TABLE(wxHtmlWindow, wxScrolledWindow) EVT_LEFT_UP(wxHtmlWindow::OnMouseUp) EVT_RIGHT_UP(wxHtmlWindow::OnMouseUp) EVT_MOTION(wxHtmlWindow::OnMouseMove) - EVT_IDLE(wxHtmlWindow::OnIdle) EVT_ERASE_BACKGROUND(wxHtmlWindow::OnEraseBackground) EVT_PAINT(wxHtmlWindow::OnPaint) #if wxUSE_CLIPBOARD