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:
@@ -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
|
||||||
|
Reference in New Issue
Block a user