mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
Help: Support loading help page by file path as command line argument
This commit is contained in:
parent
7f7656fe4e
commit
bd2a7c414c
2 changed files with 29 additions and 15 deletions
|
@ -24,8 +24,10 @@
|
|||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <AK/URL.h>
|
||||
#include <Applications/Terminal/TerminalSettingsWindowGML.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibDesktop/Launcher.h>
|
||||
#include <LibGUI/AboutDialog.h>
|
||||
#include <LibGUI/Action.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
|
@ -471,6 +473,9 @@ int main(int argc, char** argv)
|
|||
view_menu.add_action(pick_font_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/Terminal.md"), "/bin/Help");
|
||||
}));
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("Terminal", app_icon.bitmap_for_size(32), window);
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue