diff options
author | Brendan Coles <bcoles@gmail.com> | 2021-03-12 14:34:36 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-03-13 10:00:59 +0100 |
commit | f21af0922aee3c5fe028f84846beed973b07926f (patch) | |
tree | b2e8545c9eeab25433936144ed8c73b4a477f7fa /Userland/Applications | |
parent | 7f60090c433ae902e6766c786d365fb56b2ab121 (diff) | |
download | serenity-f21af0922aee3c5fe028f84846beed973b07926f.zip |
QuickShow: Add help documentation
Diffstat (limited to 'Userland/Applications')
-rw-r--r-- | Userland/Applications/QuickShow/main.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Userland/Applications/QuickShow/main.cpp b/Userland/Applications/QuickShow/main.cpp index 1130729c41..331bffa714 100644 --- a/Userland/Applications/QuickShow/main.cpp +++ b/Userland/Applications/QuickShow/main.cpp @@ -68,6 +68,12 @@ int main(int argc, char** argv) return 1; } + if (!Desktop::Launcher::add_allowed_handler_with_only_specific_urls( + "/bin/Help", { URL::create_with_file_protocol("/usr/share/man/man1/QuickShow.md") })) { + warnln("Failed to set up allowed launch URLs"); + return 1; + } + if (!Desktop::Launcher::seal_allowlist()) { warnln("Failed to seal allowed launch URLs"); return 1; @@ -299,6 +305,9 @@ int main(int argc, char** argv) view_menu.add_action(hide_show_toolbar_action); 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/QuickShow.md"), "/bin/Help"); + })); help_menu.add_action(GUI::CommonActions::make_about_action("QuickShow", app_icon, window)); app->set_menubar(move(menubar)); |