mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:07:34 +00:00
QuickShow: Add help documentation
This commit is contained in:
parent
7f60090c43
commit
f21af0922a
2 changed files with 32 additions and 0 deletions
23
Base/usr/share/man/man1/QuickShow.md
Normal file
23
Base/usr/share/man/man1/QuickShow.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
## Name
|
||||||
|
|
||||||
|
QuickShow - Serenity image viewer
|
||||||
|
|
||||||
|
## Synopsis
|
||||||
|
|
||||||
|
```**sh
|
||||||
|
$ QuickShow [file]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Description
|
||||||
|
|
||||||
|
QuickShow is an image viewing application for Serenity.
|
||||||
|
|
||||||
|
## Arguments
|
||||||
|
|
||||||
|
* `file`: The image file to be displayed.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
```sh
|
||||||
|
$ QuickShow /res/graphics/buggie.png
|
||||||
|
```
|
|
@ -68,6 +68,12 @@ int main(int argc, char** argv)
|
||||||
return 1;
|
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()) {
|
if (!Desktop::Launcher::seal_allowlist()) {
|
||||||
warnln("Failed to seal allowed launch URLs");
|
warnln("Failed to seal allowed launch URLs");
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -299,6 +305,9 @@ int main(int argc, char** argv)
|
||||||
view_menu.add_action(hide_show_toolbar_action);
|
view_menu.add_action(hide_show_toolbar_action);
|
||||||
|
|
||||||
auto& help_menu = menubar->add_menu("Help");
|
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));
|
help_menu.add_action(GUI::CommonActions::make_about_action("QuickShow", app_icon, window));
|
||||||
|
|
||||||
app->set_menubar(move(menubar));
|
app->set_menubar(move(menubar));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue