1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 02:13:56 +09:00

Eyes: Add 'Contents' action to help menu

This commit is contained in:
Linus Groh 2022-03-17 23:09:34 +00:00 committed by Andreas Kling
parent 2548ee4149
commit c2d11d5aa0
Notes: sideshowbarker 2024-07-17 17:14:45 +09:00
2 changed files with 7 additions and 2 deletions

View file

@ -9,4 +9,4 @@ set(SOURCES
)
serenity_app(Eyes ICON app-eyes)
target_link_libraries(Eyes LibGUI LibGfx LibMain)
target_link_libraries(Eyes LibDesktop LibGUI LibGfx LibMain)

View file

@ -5,8 +5,10 @@
*/
#include "EyesWidget.h"
#include <AK/URL.h>
#include <LibCore/ArgsParser.h>
#include <LibCore/System.h>
#include <LibDesktop/Launcher.h>
#include <LibGUI/Application.h>
#include <LibGUI/Icon.h>
#include <LibGUI/Menu.h>
@ -35,8 +37,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto app = TRY(GUI::Application::try_create(arguments));
TRY(Core::System::pledge("stdio recvfd sendfd rpath cpath wpath thread"));
TRY(Core::System::unveil("/res", "r"));
TRY(Core::System::unveil("/tmp/portal/launch", "rw"));
TRY(Core::System::unveil(nullptr, nullptr));
if ((grid_rows > 0) ^ (grid_columns > 0)) {
@ -70,6 +72,9 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(file_menu->try_add_action(GUI::CommonActions::make_quit_action([&](auto&) { app->quit(); })));
auto help_menu = TRY(window->try_add_menu("&Help"));
TRY(help_menu->try_add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_protocol("/usr/share/man/man1/Eyes.md"), "/bin/Help");
})));
TRY(help_menu->try_add_action(GUI::CommonActions::make_about_action("Eyes Demo", app_icon, window)));
window->show();