fixed code in OpenURL() to actually use the result of OnOpeningURL()

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13870 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-01-28 01:39:55 +00:00
parent 7d6d3bf31e
commit 0423bdc761

View File

@@ -180,24 +180,25 @@ wxObject* wxHtmlWinParser::GetProduct()
return top; return top;
} }
wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type, wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type,
const wxString& url) const const wxString& url) const
{ {
// FIXME - normalize the URL to full path before passing to // FIXME - normalize the URL to full path before passing to
// OnOpeningURL!! // OnOpeningURL!!
if ( m_Window ) if ( m_Window )
{ {
wxString redirect;
wxString myurl(url); wxString myurl(url);
wxHtmlOpeningStatus status; wxHtmlOpeningStatus status;
for (;;) for (;;)
{ {
if ( m_Window->OnOpeningURL(type, myurl, &redirect) == wxHTML_REDIRECT ) wxString redirect;
myurl = redirect; status = m_Window->OnOpeningURL(type, myurl, &redirect);
else if ( status != wxHTML_REDIRECT )
break; break;
myurl = redirect;
} }
if ( status == wxHTML_BLOCK ) if ( status == wxHTML_BLOCK )
return NULL; return NULL;
else else