From 181eacd3ba9cab1736b6557ea43f44cefbad3be8 Mon Sep 17 00:00:00 2001 From: Nicholas Hollett Date: Sat, 16 May 2020 14:46:28 +0100 Subject: 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/ --- Libraries/LibVT/TerminalWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Libraries') 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&) { -- cgit v1.2.3