Skip to content

Commit

Permalink
PixelPaint: Add link to manpage
Browse files Browse the repository at this point in the history
Add a link to the manpage in the Help menu.
  • Loading branch information
cubiclove authored and ADKaster committed Jan 4, 2024
1 parent e0ea5a8 commit 30ea7b2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Userland/Applications/PixelPaint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,4 @@ set(GENERATED_SOURCES
)

serenity_app(PixelPaint ICON app-pixel-paint)
target_link_libraries(PixelPaint PRIVATE LibCore LibImageDecoderClient LibGUI LibGfx LibFileSystemAccessClient LibConfig LibMain LibThreading)
target_link_libraries(PixelPaint PRIVATE LibCore LibImageDecoderClient LibGUI LibGfx LibFileSystemAccessClient LibConfig LibDesktop LibMain LibThreading)
4 changes: 4 additions & 0 deletions Userland/Applications/PixelPaint/MainWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <LibConfig/Client.h>
#include <LibCore/Debounce.h>
#include <LibCore/MimeData.h>
#include <LibDesktop/Launcher.h>
#include <LibGUI/Application.h>
#include <LibGUI/Clipboard.h>
#include <LibGUI/Icon.h>
Expand Down Expand Up @@ -1166,6 +1167,9 @@ ErrorOr<void> MainWidget::initialize_menubar(GUI::Window& window)

auto help_menu = window.add_menu("&Help"_string);
help_menu->add_action(GUI::CommonActions::make_command_palette_action(&window));
help_menu->add_action(GUI::CommonActions::make_help_action([](auto&) {
Desktop::Launcher::open(URL::create_with_file_scheme("/usr/share/man/man1/Applications/PixelPaint.md"), "/bin/Help");
}));
help_menu->add_action(GUI::CommonActions::make_about_action("Pixel Paint"_string, GUI::Icon::default_icon("app-pixel-paint"sv), &window));

m_levels_dialog_action = GUI::Action::create(
Expand Down
1 change: 1 addition & 0 deletions Userland/Applications/PixelPaint/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
TRY(Core::System::unveil("/tmp/session/%sid/portal/clipboard", "rw"));
TRY(Core::System::unveil("/tmp/session/%sid/portal/filesystemaccess", "rw"));
TRY(Core::System::unveil("/tmp/session/%sid/portal/image", "rw"));
TRY(Core::System::unveil("/tmp/session/%sid/portal/launch", "rw"));
TRY(Core::System::unveil("/etc/FileIconProvider.ini", "r"));
TRY(Core::System::unveil(nullptr, nullptr));

Expand Down

0 comments on commit 30ea7b2

Please sign in to comment.