mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Merge branch 'report-viewer-fixes'
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
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));
|
||||
|
||||
web->Bind(wxEVT_WEBVIEW_NAVIGATING, &Viewer::OnNavigationStart, this);
|
||||
|
||||
wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
topsizer->Add(web, 1, wxEXPAND);
|
||||
@@ -37,3 +39,8 @@ Viewer::Viewer(wxWindow *parent, const wxString& title, const std::string& path)
|
||||
SetSize(800,600);
|
||||
SetIcon(wxIconLocation("BOSS.exe"));
|
||||
}
|
||||
|
||||
void Viewer::OnNavigationStart(wxWebViewEvent& event) {
|
||||
wxLaunchDefaultBrowser(event.GetURL());
|
||||
event.Veto();
|
||||
}
|
||||
|
||||
@@ -26,9 +26,13 @@
|
||||
|
||||
#include "ids.h"
|
||||
|
||||
#include <wx/webview.h>
|
||||
|
||||
class Viewer : public wxFrame {
|
||||
public:
|
||||
Viewer(wxWindow *parent, const wxString& title, const std::string& path);
|
||||
|
||||
void OnNavigationStart(wxWebViewEvent& event);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user