mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Debug log can now be opened from the GUI (issue #62).
This commit is contained in:
@@ -145,7 +145,7 @@ This documentation is a work in progress, covering an application that is also s
|
||||
<p>Clicking the <q>Edit Metadata</q> button will open BOSS's <a href="#usage-custom">metadata editor</a>, 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.
|
||||
<p>Clicking the <q>Sort Plugins</q> button will begin the <a href="#usage-sort">plugin sorting process</a>. 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.
|
||||
<p>Clicking the <q>View Last Report</q> button will display the <a href="#usage-log">report</a> generated the last time BOSS sorted your plugins.
|
||||
<p>The <q>File</q> menu provides menu items for sorting plugins, viewing the last report BOSS generated and quitting BOSS, while the <q>Edit</q> menu provides menu items for accessing BOSS's metadata editor and the <a href="#usage-settings">settings window</a>.
|
||||
<p>The <q>File</q> menu provides menu items for sorting plugins, viewing the debug log and the last report BOSS generated, and quitting BOSS, while the <q>Edit</q> menu provides menu items for accessing BOSS's metadata editor and the <a href="#usage-settings">settings window</a>.
|
||||
<p>The <q>Game</q> 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.
|
||||
<p>The <q>Help</q> 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 <a href="http://boss-developers.github.io">project homepage</a>.
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
+19
-2
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user