1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +00:00

Terminal: Tell LaunchServer we only need to open "Help"

This commit is contained in:
Andreas Kling 2021-01-03 11:43:03 +01:00
parent 1f1763c37a
commit 8bf98eb581

View file

@ -472,6 +472,14 @@ int main(int argc, char** argv)
view_menu.add_separator();
view_menu.add_action(pick_font_action);
if (!Desktop::Launcher::add_allowed_handler_with_only_specific_urls(
"/bin/Help",
{ URL::create_with_file_protocol("/usr/share/man/man1/Terminal.md") })
|| !Desktop::Launcher::seal_allowed_handler_list()) {
warnln("Failed to set up allowed launch handlers");
return 1;
}
auto& help_menu = menubar->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/Terminal.md"), "/bin/Help");