]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_html.cpp
make --static flag act on --cppflags too.
[wxWidgets.git] / src / xrc / xh_html.cpp
index affa03f68f932c35ae64800f099d98eae0d8b6f6..dab79dc4c5258aea7a43cf1f78527a3897f368d9 100644 (file)
@@ -24,6 +24,7 @@
 #if wxUSE_HTML
 
 #include "wx/html/htmlwin.h"
 #if wxUSE_HTML
 
 #include "wx/html/htmlwin.h"
+#include "wx/filesys.h"
 
 
 wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler() 
 
 
 wxHtmlWindowXmlHandler::wxHtmlWindowXmlHandler() 
@@ -50,8 +51,19 @@ wxObject *wxHtmlWindowXmlHandler::DoCreateResource()
 
     if( HasParam( wxT("url") ))
     {
 
     if( HasParam( wxT("url") ))
     {
-        control->LoadPage( GetParamValue( wxT("url" )));
+        wxString url = GetParamValue(wxT("url" ));
+        wxFileSystem& fsys = GetCurFileSystem();
+        
+        wxFSFile *f = fsys.OpenFile(url);
+        if (f)
+        {
+            control->LoadPage(f->GetLocation());
+            delete f;
+        }
+        else
+            control->LoadPage(url);
     }
     }
+    
     else if( HasParam( wxT("htmlcode") ))
     {
         control->SetPage( GetText(wxT("htmlcode")) );
     else if( HasParam( wxT("htmlcode") ))
     {
         control->SetPage( GetText(wxT("htmlcode")) );