1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 11:47:46 +00:00

Calendar: Add a link to the Manual in Help Menu

This commit is contained in:
Mr.UNIX 2023-12-25 18:56:19 +01:00 committed by Andreas Kling
parent 863e8c30ad
commit 467faee1b8
3 changed files with 6 additions and 2 deletions

View file

@ -11,6 +11,7 @@
#include <Applications/Calendar/CalendarWindowGML.h>
#include <LibConfig/Client.h>
#include <LibCore/System.h>
#include <LibDesktop/Launcher.h>
#include <LibGUI/Action.h>
#include <LibGUI/ActionGroup.h>
#include <LibGUI/Application.h>
@ -105,6 +106,9 @@ ErrorOr<NonnullRefPtr<CalendarWidget>> CalendarWidget::create(GUI::Window* paren
auto help_menu = parent_window->add_menu("&Help"_string);
help_menu->add_action(GUI::CommonActions::make_command_palette_action(parent_window));
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/Calendar.md"sv), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Calendar"_string, TRY(GUI::Icon::try_create_default_icon("app-calendar"sv)), parent_window));
return widget;