HexEditor: Add Help->Manual entry in Menu

This commit is contained in:
djwisdom 2022-08-29 03:36:15 +08:00 committed by Sam Atkins
commit 27f5a18ce6
Notes: sideshowbarker 2024-07-17 07:38:38 +09:00
3 changed files with 9 additions and 1 deletions

View file

@ -18,6 +18,7 @@
#include <Applications/HexEditor/HexEditorWindowGML.h>
#include <LibConfig/Client.h>
#include <LibCore/File.h>
#include <LibDesktop/Launcher.h>
#include <LibFileSystemAccessClient/Client.h>
#include <LibGUI/Action.h>
#include <LibGUI/BoxLayout.h>
@ -468,6 +469,9 @@ void HexEditorWidget::initialize_menubar(GUI::Window& window)
little_endian_mode->set_checked(true);
auto& help_menu = window.add_menu("&Help");
help_menu.add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/HexEditor.md"), "/bin/Help");
}));
help_menu.add_action(GUI::CommonActions::make_about_action("Hex Editor", GUI::Icon::default_icon("app-hex-editor"sv), &window));
}