wxURI is enough for the basic url operations.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31103 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2004-12-21 17:20:47 +00:00
parent 1296186133
commit 7e49601492
20 changed files with 16 additions and 37 deletions

View File

@ -11,7 +11,6 @@
<wx-lib>gizmos</wx-lib>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
</exe>

View File

@ -23,15 +23,14 @@
<wx-lib>adv</wx-lib>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>studio.rc</win32-res>
</exe>
<wx-data id="data">
<files>
studio_resources.wxr
</files>
</wx-data>
</makefile>

View File

@ -23,7 +23,6 @@
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>xml</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>wxrcedit.rc</win32-res>
<ldlibs>$(EXTRALIBS_XML)</ldlibs>

View File

@ -19,7 +19,6 @@
<wx-lib>odbc</wx-lib>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>dbbrowse.rc</win32-res>
</exe>

View File

@ -17,7 +17,6 @@
<wx-lib>html</wx-lib>
<wx-lib>adv</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>forty.rc</win32-res>
</exe>

View File

@ -7,11 +7,10 @@
<sources>wxpoem.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>wxpoem.rc</win32-res>
</exe>
<wx-data id="data">
<files>
wxpoem.txt wxpoem.dat

View File

@ -7,7 +7,6 @@
<sources>demo.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>demo.rc</win32-res>
</exe>
@ -31,7 +30,7 @@
up.gif
</files>
</wx-data>
<wx-data id="data_doc">
<dstdir>$(BUILDDIR)/doc</dstdir>
<srcdir>$(SRCDIR)/doc</srcdir>

View File

@ -7,7 +7,6 @@
<sources>htlbox.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>htlbox.rc</win32-res>
</exe>

View File

@ -9,7 +9,6 @@
<sources>about.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>about.rc</win32-res>
</exe>

View File

@ -9,7 +9,6 @@
<sources>help.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>help.rc</win32-res>
</exe>

View File

@ -9,7 +9,6 @@
<sources>helpview.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>helpview.rc</win32-res>
</exe>

View File

@ -9,7 +9,6 @@
<sources>printing.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<wx-lib>adv</wx-lib>
<win32-res>printing.rc</win32-res>

View File

@ -9,7 +9,6 @@
<sources>virtual.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>virtual.rc</win32-res>
</exe>

View File

@ -9,7 +9,6 @@
<sources>widget.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>widget.rc</win32-res>
</exe>

View File

@ -9,7 +9,6 @@
<sources>zip.cpp</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>zip.rc</win32-res>
</exe>

View File

@ -15,7 +15,6 @@
<wx-lib>adv</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>xml</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>xrcdemo.rc</win32-res>
</exe>

View File

@ -257,36 +257,34 @@ wxFSFile *wxHtmlWinParser::OpenURL(wxHtmlURLType type,
{
wxString myfullurl(myurl);
#if wxUSE_URL
// consider url as absolute path first
wxURL current(wxURL::Unescape(myurl));
myfullurl = current.GetURL();
wxURI current(myurl);
myfullurl = current.BuildUnescapedURI();
// if not absolute then ...
if( current.IsReference() )
{
wxString basepath = GetFS()->GetPath();
wxURI base(wxURL::Unescape(basepath));
wxURI base(basepath);
// try to apply base path if valid ...
// ... try to apply base path if valid ...
if( !base.IsReference() )
{
wxURI path(myfullurl);
path.Resolve( base );
myfullurl = path.BuildURI();
myfullurl = path.BuildUnescapedURI();
}
else
{
// ... or force such addition if not included already
if( !current.GetURL().Contains(basepath) )
if( !current.GetPath().Contains(base.GetPath()) )
{
basepath += myurl;
wxURL connected( wxURL::Unescape(basepath) );
myfullurl = connected.GetURL();
wxURI connected( basepath );
myfullurl = connected.BuildUnescapedURI();
}
}
}
#endif
wxString redirect;
status = m_Window->OnOpeningURL(type, myfullurl, &redirect);

View File

@ -22,12 +22,11 @@
settingsdialog.cpp
utils.cpp
</sources>
<wx-lib>adv</wx-lib>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>xml</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
</exe>
@ -36,5 +35,5 @@
<srcdir>$(SRCDIR)/../configs</srcdir>
<files>wxwin250.wxs</files>
</wx-data>
</makefile>

View File

@ -12,11 +12,10 @@
<win32-res>hhp2cached.rc</win32-res>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<install-to>$(BINDIR)</install-to>
</exe>
<!-- <wx-data id="data">
<files>
test.zip

View File

@ -24,13 +24,12 @@
<wx-lib>base</wx-lib>
<install-to>$(BINDIR)</install-to>
</exe>
<exe id="tex2rtf_gui" template="wx_util" template_append="wx_append"
cond="USE_GUI=='1'">
<sources>$(TEX2RTF_SRC)</sources>
<wx-lib>html</wx-lib>
<wx-lib>core</wx-lib>
<wx-lib>net</wx-lib>
<wx-lib>base</wx-lib>
<install-to>$(BINDIR)</install-to>
</exe>