mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Added Ctrl+1/2/3/... shortcuts to Emote Popup (#2263)
This commit is contained in:
parent
eb8eecdfed
commit
dcebcd4456
|
@ -4,6 +4,7 @@
|
|||
|
||||
- Major: Added "Channel Filters". See https://wiki.chatterino.com/Filters/ for how they work or how to configure them. (#1748, #2083, #2090, #2200)
|
||||
- Major: Added Streamer Mode configuration (under `Settings -> General`), where you can select which features of Chatterino should behave differently when you are in Streamer Mode. (#2001)
|
||||
- Minor: Added Ctrl + 1/2/3/... and Ctrl+9 shortcuts to Emote Popup (activated with Ctrl+E). They work exactly the same as shortcuts in main window. (#2263)
|
||||
- Minor: Added reconnect link to the "You are banned" message. (#2266)
|
||||
- Minor: Improved search popup window titles. (#2268)
|
||||
- Minor: Made "#channel" in `/mentions` tab a clickable link which takes you to the channel that you were mentioned in. (#2220)
|
||||
|
|
|
@ -305,12 +305,11 @@ void Window::addShortcuts()
|
|||
// CTRL + 1-8 to open corresponding tab.
|
||||
for (auto i = 0; i < 8; i++)
|
||||
{
|
||||
char hotkey[7];
|
||||
std::sprintf(hotkey, "CTRL+%d", i + 1);
|
||||
const auto openTab = [this, i] {
|
||||
this->notebook_->selectIndex(i);
|
||||
};
|
||||
createWindowShortcut(this, hotkey, openTab);
|
||||
createWindowShortcut(this, QString("CTRL+%1").arg(i + 1).toUtf8(),
|
||||
openTab);
|
||||
}
|
||||
|
||||
createWindowShortcut(this, "CTRL+9", [this] {
|
||||
|
|
|
@ -156,6 +156,22 @@ EmotePopup::EmotePopup(QWidget *parent)
|
|||
|
||||
this->loadEmojis();
|
||||
|
||||
// CTRL + 1-8 to open corresponding tab
|
||||
for (auto i = 0; i < 8; i++)
|
||||
{
|
||||
const auto openTab = [this, i, notebook] {
|
||||
notebook->selectIndex(i);
|
||||
};
|
||||
createWindowShortcut(this, QString("CTRL+%1").arg(i + 1).toUtf8(),
|
||||
openTab);
|
||||
}
|
||||
|
||||
// Open last tab (first one from right)
|
||||
createWindowShortcut(this, "CTRL+9", [=] {
|
||||
notebook->selectLastTab();
|
||||
});
|
||||
|
||||
// Cycle through tabs
|
||||
createWindowShortcut(this, "CTRL+Tab", [=] {
|
||||
notebook->selectNextTab();
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue