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

This commit is contained in:
Andreas Kling 2021-01-03 11:43:03 +01:00
commit 8bf98eb581
Notes: sideshowbarker 2024-07-19 00:10:37 +09:00

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");