From 59160c5d042c30038396537fb363df2e6a151e97 Mon Sep 17 00:00:00 2001 From: Mm2PL Date: Mon, 7 Aug 2023 15:41:32 +0200 Subject: [PATCH] Minor: Add missing hotkey Action for Open Player in Browser. (#4756) --- CHANGELOG.md | 1 + src/controllers/hotkeys/ActionNames.hpp | 2 ++ src/widgets/splits/Split.cpp | 5 +++++ src/widgets/splits/SplitHeader.cpp | 4 +++- 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d01d2d3..c7db0028 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ - Minor: Allow for customizing the behavior of `Right Click`ing of usernames. (#4622, #4751) - Minor: Added support for opening incognito links in firefox-esr and chromium. (#4745) - Minor: Added support for opening incognito links under Linux/BSD using XDG. (#4745) +- Minor: Add missing hotkey Action for Open Player in Browser. (#4756) - Bugfix: Increased amount of blocked users loaded from 100 to 1,000. (#4721) - Bugfix: Fixed generation of crashdumps by the browser-extension process when the browser was closed. (#4667) - Bugfix: Fix spacing issue with mentions inside RTL text. (#4677) diff --git a/src/controllers/hotkeys/ActionNames.hpp b/src/controllers/hotkeys/ActionNames.hpp index 03907ca6..c1e429d0 100644 --- a/src/controllers/hotkeys/ActionNames.hpp +++ b/src/controllers/hotkeys/ActionNames.hpp @@ -110,6 +110,8 @@ inline const std::map actionNames{ "Which direction to look for a split to focus?", }}, {"openInBrowser", ActionDefinition{"Open channel in browser"}}, + {"openPlayerInBrowser", + ActionDefinition{"Open stream in browser player"}}, {"openInCustomPlayer", ActionDefinition{"Open stream in custom player"}}, {"openInStreamlink", ActionDefinition{"Open stream in streamlink"}}, diff --git a/src/widgets/splits/Split.cpp b/src/widgets/splits/Split.cpp index 1b00bf52..80207c3a 100644 --- a/src/widgets/splits/Split.cpp +++ b/src/widgets/splits/Split.cpp @@ -552,6 +552,11 @@ void Split::addShortcuts() this->openWithCustomScheme(); return ""; }}, + {"openPlayerInBrowser", + [this](std::vector) -> QString { + this->openBrowserPlayer(); + return ""; + }}, {"openModView", [this](std::vector) -> QString { this->openModViewInBrowser(); diff --git a/src/widgets/splits/SplitHeader.cpp b/src/widgets/splits/SplitHeader.cpp index 4bce72ba..670e1f83 100644 --- a/src/widgets/splits/SplitHeader.cpp +++ b/src/widgets/splits/SplitHeader.cpp @@ -399,7 +399,9 @@ std::unique_ptr SplitHeader::createMainMenu() h->getDisplaySequence(HotkeyCategory::Split, "openInBrowser")); #ifndef USEWEBENGINE menu->addAction(OPEN_PLAYER_IN_BROWSER, this->split_, - &Split::openBrowserPlayer); + &Split::openBrowserPlayer, + h->getDisplaySequence(HotkeyCategory::Split, + "openPlayerInBrowser")); #endif menu->addAction( OPEN_IN_STREAMLINK, this->split_, &Split::openInStreamlink,