From d60ab1fee5bc8eadc730a81f768b6f52c0c1e094 Mon Sep 17 00:00:00 2001 From: WrinklyNinja Date: Wed, 29 Jan 2014 14:30:28 +0000 Subject: [PATCH] Viewer now takes wxString URL to try avoiding encoding issues. Part of issue #94. --- src/gui/viewer.cpp | 4 ++-- src/gui/viewer.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/viewer.cpp b/src/gui/viewer.cpp index 6e05b552..977633a8 100644 --- a/src/gui/viewer.cpp +++ b/src/gui/viewer.cpp @@ -26,8 +26,8 @@ #include -Viewer::Viewer(wxWindow *parent, const wxString& title, const std::string& path) : wxFrame(parent, wxID_ANY, title) { - wxWebView * web = wxWebView::New(this, wxID_ANY, boss::ToFileURL(path)); +Viewer::Viewer(wxWindow *parent, const wxString& title, const wxString& url) : wxFrame(parent, wxID_ANY, title) { + wxWebView * web = wxWebView::New(this, wxID_ANY, url); web->Bind(wxEVT_WEBVIEW_NAVIGATING, &Viewer::OnNavigationStart, this); diff --git a/src/gui/viewer.h b/src/gui/viewer.h index 49cb925b..aab30f78 100644 --- a/src/gui/viewer.h +++ b/src/gui/viewer.h @@ -30,7 +30,7 @@ class Viewer : public wxFrame { public: - Viewer(wxWindow *parent, const wxString& title, const std::string& path); + Viewer(wxWindow *parent, const wxString& title, const wxString& url); void OnNavigationStart(wxWebViewEvent& event); };