From 80b6573cbf1ac66d30501130c4b1526bfd9495e9 Mon Sep 17 00:00:00 2001 From: GenevensiS <66968533+G-e-n-e-v-e-n-s-i-S@users.noreply.github.com> Date: Wed, 7 Jan 2026 06:17:16 +0100 Subject: [PATCH] add documentation link in help menu --- data/en.mse-locale/locale | 8 +++++--- src/data/settings.cpp | 2 ++ src/data/settings.hpp | 1 + src/gui/set/window.cpp | 6 ++++++ src/gui/set/window.hpp | 1 + src/gui/value/image.cpp | 2 +- src/util/error.cpp | 2 +- 7 files changed, 17 insertions(+), 5 deletions(-) diff --git a/data/en.mse-locale/locale b/data/en.mse-locale/locale index 56040998..72ae8b85 100644 --- a/data/en.mse-locale/locale +++ b/data/en.mse-locale/locale @@ -116,6 +116,7 @@ menu: help: &Help index: &Index... F1 website: &Website... + documentation: &Documentation... about: &About Magic Set Editor... ## symbol editor menus @@ -245,7 +246,8 @@ help: # help menu index: Open the index - website: Open the MSE website + website: Open the MSE home website + documentation: Open the MSE documentation website about: Show information about this app # new set window @@ -765,8 +767,8 @@ button: with file extension allow image download: Allow downloading of images. - This may significantly increase - the duration of imports. + This may significantly increase the + duration of JSON and CSV imports. # column select move up: Move &Up diff --git a/src/data/settings.cpp b/src/data/settings.cpp index 83d70f70..c493c267 100644 --- a/src/data/settings.cpp +++ b/src/data/settings.cpp @@ -210,6 +210,7 @@ Settings::Settings() , check_updates (CHECK_IF_CONNECTED) , check_updates_all (true) , website_url (_("https://magicseteditor.boards.net/")) + , documentation_url (_("https://mseverse.miraheze.org/wiki/Dev:Documentation#Topics")) , install_type (INSTALL_DEFAULT) {} @@ -353,6 +354,7 @@ IMPLEMENT_REFLECTION_NO_SCRIPT(Settings) { REFLECT(check_updates_all); REFLECT(install_type); REFLECT(website_url); + REFLECT(documentation_url); REFLECT(game_settings); REFLECT(stylesheet_settings); REFLECT(default_stylesheet_settings); diff --git a/src/data/settings.hpp b/src/data/settings.hpp index b5939bdc..0359623c 100644 --- a/src/data/settings.hpp +++ b/src/data/settings.hpp @@ -242,6 +242,7 @@ public: CheckUpdates check_updates; bool check_updates_all; ///< Check updates of all packages, not just the program String website_url; + String documentation_url; // --------------------------------------------------- : Installation settings diff --git a/src/gui/set/window.cpp b/src/gui/set/window.cpp index 429db2f0..1d30f64c 100644 --- a/src/gui/set/window.cpp +++ b/src/gui/set/window.cpp @@ -104,6 +104,7 @@ SetWindow::SetWindow(Window* parent, const SetP& set) auto menuHelp = new wxMenu(); add_menu_item_tr(menuHelp, ID_HELP_INDEX, "help", "index"); add_menu_item_tr(menuHelp, ID_HELP_WEBSITE, nullptr, "website"); + add_menu_item_tr(menuHelp, ID_HELP_DOCUMENTATION, nullptr, "documentation"); add_menu_item_tr(menuHelp, ID_HELP_ABOUT, nullptr, "about"); menuBar->Append(menuHelp, _MENU_("help")); @@ -829,6 +830,10 @@ void SetWindow::onHelpIndex(wxCommandEvent&) { void SetWindow::onHelpWebsite(wxCommandEvent&) { wxLaunchDefaultBrowser(settings.website_url); +} + +void SetWindow::onHelpDocumentation(wxCommandEvent&) { + wxLaunchDefaultBrowser(settings.documentation_url); } void SetWindow::onHelpAbout(wxCommandEvent&) { @@ -891,6 +896,7 @@ BEGIN_EVENT_TABLE(SetWindow, wxFrame) EVT_TOOL_RANGE (ID_WINDOW_MIN, ID_WINDOW_MAX, SetWindow::onWindowSelect) EVT_MENU (ID_HELP_INDEX, SetWindow::onHelpIndex) EVT_MENU (ID_HELP_WEBSITE, SetWindow::onHelpWebsite) + EVT_MENU (ID_HELP_DOCUMENTATION, SetWindow::onHelpDocumentation) EVT_MENU (ID_HELP_ABOUT, SetWindow::onHelpAbout) EVT_MENU_OPEN ( SetWindow::onMenuOpen) EVT_TOOL_RANGE (ID_CHILD_MIN, ID_CHILD_MAX, SetWindow::onChildMenu) diff --git a/src/gui/set/window.hpp b/src/gui/set/window.hpp index 3a84f857..3f82cb48 100644 --- a/src/gui/set/window.hpp +++ b/src/gui/set/window.hpp @@ -166,6 +166,7 @@ private: void onHelpIndex (wxCommandEvent&); void onHelpWebsite (wxCommandEvent&); + void onHelpDocumentation (wxCommandEvent&); void onHelpAbout (wxCommandEvent&); // --------------------------------------------------- : Window events - other diff --git a/src/gui/value/image.cpp b/src/gui/value/image.cpp index 510d81cc..c2ff0d68 100644 --- a/src/gui/value/image.cpp +++ b/src/gui/value/image.cpp @@ -24,7 +24,7 @@ bool ImageValueEditor::onLeftDClick(const RealPoint&, wxMouseEvent&) { String directory = settings.default_image_dir; String filename = _(""); CardP card = parent.getCard(); - String cardname = card ? card->identification() : _("clipboard"); + String cardname = card ? card->identification() : _("clipboard"); // use card.uid instead of card->identification() ? if (ImageSliceWindow::previously_used_settings_path.find(cardname) != ImageSliceWindow::previously_used_settings_path.end()) { String filepath = ImageSliceWindow::previously_used_settings_path[cardname]; size_t pos = filepath.rfind(wxFileName::GetPathSeparator()); diff --git a/src/util/error.cpp b/src/util/error.cpp index 3edc3377..d3beb13a 100644 --- a/src/util/error.cpp +++ b/src/util/error.cpp @@ -114,7 +114,7 @@ InternalError::InternalError(const String& str) str + _("\n\n") _("Please save your work (use 'save as' so you don't overwrite things)\n") _("and restart Magic Set Editor.\n") - _("You can also find a backup of your set in the same folder as your set file\n") + _("You can also find a backup of your last save in the same folder as your set file\n") _("called 'SETNAME.mse-set.bak'. Rename it to 'SETNAME-backup.mse-set' to open it.\n") _("You should leave a bug report on https://github.com/twanvl/MagicSetEditor2/issues/\n") _("Press Ctrl+C to copy this message to the clipboard.")