diff --git a/docs/BOSS Readme.html b/docs/BOSS Readme.html index a72098d6..5f23329a 100644 --- a/docs/BOSS Readme.html +++ b/docs/BOSS Readme.html @@ -145,7 +145,7 @@ This documentation is a work in progress, covering an application that is also s

Clicking the Edit Metadata button will open BOSS's metadata editor, where you can make changes to the metadata BOSS uses to sort plugins, the messages that get displayed for plugins, and any Bash Tag suggestions BOSS makes.

Clicking the Sort Plugins button will begin the plugin sorting process. This will sort your plugins, allow you to make any changes to the load order it produces, then display a report that details the results of BOSS's activity.

Clicking the View Last Report button will display the report generated the last time BOSS sorted your plugins. -

The File menu provides menu items for sorting plugins, viewing the last report BOSS generated and quitting BOSS, while the Edit menu provides menu items for accessing BOSS's metadata editor and the settings window. +

The File menu provides menu items for sorting plugins, viewing the debug log and the last report BOSS generated, and quitting BOSS, while the Edit menu provides menu items for accessing BOSS's metadata editor and the settings window.

The Game menu allows you to change which game BOSS is running for without having to close and re-open it. Games that BOSS cannot find are greyed out, and the the one BOSS is running for is marked with a dot to its left. To change the active game, simply select another game in the list.

The Help menu provides a link to this readme and an about page that contains the version of BOSS being run, some legal information and a link to the project homepage. diff --git a/src/gui/ids.h b/src/gui/ids.h index 4190dd22..83df235c 100644 --- a/src/gui/ids.h +++ b/src/gui/ids.h @@ -37,6 +37,7 @@ enum { //Main window. OPTION_EditMetadata = wxID_HIGHEST + 1, // declares an id which will be used to call our button OPTION_ViewLastReport, + OPTION_ViewDebugLog, OPTION_SortPlugins, MENU_ShowSettings, //Settings window. diff --git a/src/gui/main.cpp b/src/gui/main.cpp index 63aacee1..30eff073 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -367,6 +367,7 @@ Launcher::Launcher(const wxChar *title, YAML::Node& settings, Game& game, vector //Construct menus. //File Menu FileMenu->Append(OPTION_ViewLastReport, translate("&View Last Report")); + FileMenu->Append(OPTION_ViewDebugLog, translate("View &Debug Log")); FileMenu->Append(OPTION_SortPlugins, translate("&Sort Plugins")); FileMenu->AppendSeparator(); FileMenu->Append(wxID_EXIT); @@ -402,6 +403,7 @@ Launcher::Launcher(const wxChar *title, YAML::Node& settings, Game& game, vector //Bind event handlers. Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnQuit, this, wxID_EXIT); Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnViewLastReport, this, OPTION_ViewLastReport); + Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnOpenDebugLog, this, OPTION_ViewDebugLog); Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnSortPlugins, this, OPTION_SortPlugins); Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnEditMetadata, this, OPTION_EditMetadata); Bind(wxEVT_COMMAND_MENU_SELECTED, &Launcher::OnOpenSettings, this, MENU_ShowSettings); @@ -959,9 +961,9 @@ void Launcher::OnGameChange(wxCommandEvent& event) { void Launcher::OnHelp(wxCommandEvent& event) { //Look for file. BOOST_LOG_TRIVIAL(debug) << "Opening readme."; - if (fs::exists(g_path_readme.string())) { + if (fs::exists(g_path_readme)) { wxLaunchDefaultApplication(g_path_readme.string()); - } else { //No ReadMe exists, show a pop-up message saying so. + } else { //No readme exists, show a pop-up message saying so. BOOST_LOG_TRIVIAL(error) << "File \"" << g_path_readme.string() << "\" could not be found."; wxMessageBox( FromUTF8(format(loc::translate("Error: \"%1%\" cannot be found.")) % g_path_readme.string()), @@ -971,6 +973,21 @@ void Launcher::OnHelp(wxCommandEvent& event) { } } +void Launcher::OnOpenDebugLog(wxCommandEvent& event) { + //Look for file. + BOOST_LOG_TRIVIAL(debug) << "Opening readme."; + if (fs::exists(g_path_log)) { + wxLaunchDefaultApplication(g_path_log.string()); + } else { //No log exists, show a pop-up message saying so. + BOOST_LOG_TRIVIAL(error) << "File \"" << g_path_log.string() << "\" could not be found."; + wxMessageBox( + FromUTF8(format(loc::translate("Error: \"%1%\" cannot be found.")) % g_path_log.string()), + translate("BOSS: Error"), + wxOK | wxICON_ERROR, + this); + } +} + void Launcher::OnAbout(wxCommandEvent& event) { BOOST_LOG_TRIVIAL(debug) << "Opening About dialog."; wxAboutDialogInfo aboutInfo; diff --git a/src/gui/main.h b/src/gui/main.h index 8cd07381..637c8355 100644 --- a/src/gui/main.h +++ b/src/gui/main.h @@ -52,6 +52,7 @@ public: void OnViewLastReport(wxCommandEvent& event); void OnOpenSettings(wxCommandEvent& event); + void OnOpenDebugLog(wxCommandEvent& event); void OnGameChange(wxCommandEvent& event); void OnHelp(wxCommandEvent& event); void OnAbout(wxCommandEvent& event);