Removed ability to open report in default browser.

It didn't actually add anything really useful, and the static report
HTML file broke opening the browser.
This commit is contained in:
WrinklyNinja
2014-05-08 20:38:21 +01:00
parent 0a3e9667f3
commit f457e131a6
5 changed files with 7 additions and 30 deletions
-1
View File
@@ -7,7 +7,6 @@ Game: auto # auto, or one of the 'folder' values below.
Last Game: auto # auto, or one of the 'folder' values below.
Debug Verbosity: 0 # 0, 1, 2, 3. Logging takes place if > 0.
Update Masterlist: true
View Report Externally: false
Generate Graph Image: false
# Games. The four types are 'Oblivion', 'Skyrim', 'Fallout3' and 'FalloutNV'. They correspond to each base game's libespm and libloadorder settings.
-1
View File
@@ -263,7 +263,6 @@ namespace loot {
root["Last Game"] = "auto";
root["Debug Verbosity"] = 0;
root["Update Masterlist"] = true;
root["View Report Externally"] = false;
games.push_back(Game(Game::tes4));
games.push_back(Game(Game::tes5));
+7 -17
View File
@@ -514,16 +514,10 @@ void Launcher::OnClose(wxCloseEvent& event) {
}
void Launcher::OnViewLastReport(wxCommandEvent& event) {
if (_settings["View Report Externally"] && _settings["View Report Externally"].as<bool>()) {
BOOST_LOG_TRIVIAL(debug) << "Opening report in external application...";
wxLaunchDefaultBrowser(FromUTF8(ToFileURL(g_path_report.string() + "?data=" + _game->ReportDataPath().string())));
}
else {
//Create viewer window.
BOOST_LOG_TRIVIAL(debug) << "Opening viewer window...";
Viewer *viewer = new Viewer(this, translate("LOOT: Report Viewer"), FromUTF8(ToFileURL(g_path_report.string() + "?data=" + _game->ReportDataPath().string())));
viewer->Show();
}
//Create viewer window.
BOOST_LOG_TRIVIAL(debug) << "Opening viewer window...";
Viewer *viewer = new Viewer(this, translate("LOOT: Report Viewer"), FromUTF8(ToFileURL(g_path_report.string() + "?data=" + _game->ReportDataPath().string())));
viewer->Show();
BOOST_LOG_TRIVIAL(debug) << "Report displayed.";
}
@@ -932,13 +926,9 @@ void Launcher::OnSortPlugins(wxCommandEvent& event) {
ViewButton->Enable(true);
BOOST_LOG_TRIVIAL(debug) << "Displaying report...";
if (_settings["View Report Externally"] && _settings["View Report Externally"].as<bool>()) {
wxLaunchDefaultBrowser(FromUTF8(ToFileURL(g_path_report.string() + "?data=" + _game->ReportDataPath().string())));
} else {
//Create viewer window.
Viewer *viewer = new Viewer(this, translate("LOOT: Report Viewer"), FromUTF8(ToFileURL(g_path_report.string() + "?data=" + _game->ReportDataPath().string())));
viewer->Show();
}
//Create viewer window.
Viewer *viewer = new Viewer(this, translate("LOOT: Report Viewer"), FromUTF8(ToFileURL(g_path_report.string() + "?data=" + _game->ReportDataPath().string())));
viewer->Show();
BOOST_LOG_TRIVIAL(debug) << "Report display successful. Sorting process complete.";
}
-10
View File
@@ -68,7 +68,6 @@ SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node
removeBtn = new wxButton(this, BUTTON_RemoveGame, translate("Remove Game"));
UpdateMasterlistBox = new wxCheckBox(this, wxID_ANY, translate("Update masterlist before sorting."));
reportViewBox = new wxCheckBox(this, wxID_ANY, translate("View reports externally in default browser."));
//Set up list columns.
gamesList->AppendColumn(translate("Name"));
@@ -123,8 +122,6 @@ SettingsFrame::SettingsFrame(wxWindow *parent, const wxString& title, YAML::Node
bigBox->Add(UpdateMasterlistBox, wholeItem);
bigBox->Add(reportViewBox, wholeItem);
bigBox->AddSpacer(10);
bigBox->Add(new wxStaticText(this, wxID_ANY, translate("Language and game changes will be applied after LOOT is restarted.")), wholeItem);
@@ -178,11 +175,6 @@ void SettingsFrame::SetDefaultValues() {
UpdateMasterlistBox->SetValue(update);
}
if (_settings["View Report Externally"]) {
bool view = _settings["View Report Externally"].as<bool>();
reportViewBox->SetValue(view);
}
for (size_t i=0, max=_games.size(); i < max; ++i) {
gamesList->InsertItem(i, FromUTF8(_games[i].Name()));
gamesList->SetItem(i, 1, FromUTF8(loot::Game(_games[i].Id()).FolderName()));
@@ -229,8 +221,6 @@ void SettingsFrame::OnQuit(wxCommandEvent& event) {
_settings["Update Masterlist"] = UpdateMasterlistBox->IsChecked();
_settings["View Report Externally"] = reportViewBox->IsChecked();
_games.clear();
for (size_t i=0,max=gamesList->GetItemCount(); i < max; ++i) {
string name, folder, master, repo, branch, path, registry;
-1
View File
@@ -47,7 +47,6 @@ private:
wxChoice *GameChoice;
wxChoice *LanguageChoice;
wxCheckBox *UpdateMasterlistBox;
wxCheckBox *reportViewBox;
wxListView *gamesList;
wxButton * addBtn;