From 3e5b4a9d08a64c4fa7e86ef03b5df076a555eaa5 Mon Sep 17 00:00:00 2001 From: teknsl <64030674+teknsl@users.noreply.github.com> Date: Tue, 6 May 2025 19:47:05 +0200 Subject: [PATCH] Add hotkey action for opening account switcher (#6192) --- CHANGELOG.md | 1 + src/controllers/hotkeys/ActionNames.hpp | 1 + src/widgets/Window.cpp | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7be5dffa..d4bf60a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ - Minor: Made filters searchable in the Settings dialog search bar. (#5890) - Minor: Updated emojis to Unicode 16.0. (#6155) - Minor: Allow disabling of double-click tab renaming through setting. (#6163, #6184) +- Minor: Added hotkey Action for opening account selector. (#6192) - Bugfix: Don't create native messaging manifest file if browser directory doesn't exist. (#6116) - Bugfix: Fixed scrolling now working on inputs in the settings. (#6128) - Bugfix: Make reply-cancel button less coarse-grained. (#6106) diff --git a/src/controllers/hotkeys/ActionNames.hpp b/src/controllers/hotkeys/ActionNames.hpp index a112e7ec..f2fbbd79 100644 --- a/src/controllers/hotkeys/ActionNames.hpp +++ b/src/controllers/hotkeys/ActionNames.hpp @@ -292,6 +292,7 @@ inline const std::map actionNames{ {"newSplit", ActionDefinition{"Create a new split"}}, {"newTab", ActionDefinition{"Create a new tab"}}, {"openSettings", ActionDefinition{"Open settings"}}, + {"openAccountSelector", ActionDefinition{"Open account selector"}}, {"openTab", ActionDefinition{ "Select tab", diff --git a/src/widgets/Window.cpp b/src/widgets/Window.cpp index bac800b5..44d12ec8 100644 --- a/src/widgets/Window.cpp +++ b/src/widgets/Window.cpp @@ -352,6 +352,11 @@ void Window::addShortcuts() SettingsDialog::showDialog(this); return ""; }}, + {"openAccountSelector", // Open account selector + [](const std::vector &) -> QString { + getApp()->getWindows()->showAccountSelectPopup({0, 0}); + return ""; + }}, {"newSplit", // Create a new split [this](std::vector) -> QString { this->notebook_->getOrAddSelectedPage()->appendNewSplit(true);