diff options
author | Nicholas Hollett <niax@niax.co.uk> | 2020-05-16 14:46:28 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-05-18 11:27:27 +0200 |
commit | 181eacd3ba9cab1736b6557ea43f44cefbad3be8 (patch) | |
tree | dc0ae2b17bb20a6d7bcd41287157f91ae7f3e709 /Libraries | |
parent | 02cc3ac21fe09836ccd8f8c14dcd624d0e28809c (diff) | |
download | serenity-181eacd3ba9cab1736b6557ea43f44cefbad3be8.zip |
LibVT: Pass the handler name to Launcher::open_url to control what gets launched
Now we can pick which application gets opened in the context menu for
URLs in the Terminal \o/
Diffstat (limited to 'Libraries')
-rw-r--r-- | Libraries/LibVT/TerminalWidget.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Libraries/LibVT/TerminalWidget.cpp b/Libraries/LibVT/TerminalWidget.cpp index 80d428e282..c719ea203a 100644 --- a/Libraries/LibVT/TerminalWidget.cpp +++ b/Libraries/LibVT/TerminalWidget.cpp @@ -850,8 +850,8 @@ void TerminalWidget::context_menu_event(GUI::ContextMenuEvent& event) auto icon = Gfx::Bitmap::load_from_file(handler_icon); - m_context_menu_for_hyperlink->add_action(GUI::Action::create(String::format("Open in %s", handler_name.characters()), move(icon), [this](auto&) { - Desktop::Launcher::open(m_context_menu_href); + m_context_menu_for_hyperlink->add_action(GUI::Action::create(String::format("Open in %s", handler_name.characters()), move(icon), [this, handler](auto&) { + Desktop::Launcher::open(m_context_menu_href, handler); })); } m_context_menu_for_hyperlink->add_action(GUI::Action::create("Copy URL", [this](auto&) { |