diff options
author | Andreas Kling <kling@serenityos.org> | 2021-01-03 11:43:03 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-01-03 11:43:03 +0100 |
commit | 8bf98eb581e6297e732bd442cd5c95cf2e8940ad (patch) | |
tree | 1d16c12c448c29f1dd6cda7a659190d114fd65f9 /Applications | |
parent | 1f1763c37ae72752a43befd3644947a388e4ce6d (diff) | |
download | serenity-8bf98eb581e6297e732bd442cd5c95cf2e8940ad.zip |
Terminal: Tell LaunchServer we only need to open "Help"
Diffstat (limited to 'Applications')
-rw-r--r-- | Applications/Terminal/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Applications/Terminal/main.cpp b/Applications/Terminal/main.cpp index 09764d99ac..35c1f64871 100644 --- a/Applications/Terminal/main.cpp +++ b/Applications/Terminal/main.cpp @@ -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"); |