mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Add Ctrl+F5 as a shortcut for reconnect() (#2215)
This commit is contained in:
parent
b79d5fa6f0
commit
44262ee2ec
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
## Unversioned
|
## Unversioned
|
||||||
|
|
||||||
|
- Minor: Added a keyboard shortcut (Ctrl+F5) for "Reconnect" (#2215)
|
||||||
- Minor: Made `Try to find usernames without @ prefix` option still resolve usernames when special characters (commas, dots, (semi)colons, exclamation mark, question mark) are appended to them. (#2212)
|
- Minor: Made `Try to find usernames without @ prefix` option still resolve usernames when special characters (commas, dots, (semi)colons, exclamation mark, question mark) are appended to them. (#2212)
|
||||||
- Minor: Made usercard update user's display name (#2160)
|
- Minor: Made usercard update user's display name (#2160)
|
||||||
- Minor: Added placeholder text for message text input box. (#2143, #2149)
|
- Minor: Added placeholder text for message text input box. (#2143, #2149)
|
||||||
|
|
|
@ -66,6 +66,7 @@ KeyboardSettingsPage::KeyboardSettingsPage()
|
||||||
form->addRow(new QLabel("Ctrl + P"), new QLabel("Open Settings menu"));
|
form->addRow(new QLabel("Ctrl + P"), new QLabel("Open Settings menu"));
|
||||||
form->addRow(new QLabel("F5"),
|
form->addRow(new QLabel("F5"),
|
||||||
new QLabel("Reload subscriber and channel emotes"));
|
new QLabel("Reload subscriber and channel emotes"));
|
||||||
|
form->addRow(new QLabel("Ctrl + F5"), new QLabel("Reconnect channels"));
|
||||||
|
|
||||||
form->addItem(new QSpacerItem(16, 16));
|
form->addItem(new QSpacerItem(16, 16));
|
||||||
form->addRow(new QLabel("PageUp"), new QLabel("Scroll up"));
|
form->addRow(new QLabel("PageUp"), new QLabel("Scroll up"));
|
||||||
|
|
|
@ -118,6 +118,9 @@ Split::Split(QWidget *parent)
|
||||||
// F5: reload emotes
|
// F5: reload emotes
|
||||||
createShortcut(this, "F5", &Split::reloadChannelAndSubscriberEmotes);
|
createShortcut(this, "F5", &Split::reloadChannelAndSubscriberEmotes);
|
||||||
|
|
||||||
|
// CTRL+F5: reconnect
|
||||||
|
createShortcut(this, "CTRL+F5", &Split::reconnect);
|
||||||
|
|
||||||
// F10
|
// F10
|
||||||
createShortcut(this, "F10", [] {
|
createShortcut(this, "F10", [] {
|
||||||
auto *popup = new DebugPopup;
|
auto *popup = new DebugPopup;
|
||||||
|
@ -850,6 +853,11 @@ void Split::reloadChannelAndSubscriberEmotes()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Split::reconnect()
|
||||||
|
{
|
||||||
|
this->getChannel()->reconnect();
|
||||||
|
}
|
||||||
|
|
||||||
void Split::dragEnterEvent(QDragEnterEvent *event)
|
void Split::dragEnterEvent(QDragEnterEvent *event)
|
||||||
{
|
{
|
||||||
if (getSettings()->imageUploaderEnabled &&
|
if (getSettings()->imageUploaderEnabled &&
|
||||||
|
|
|
@ -144,6 +144,7 @@ public slots:
|
||||||
void showViewerList();
|
void showViewerList();
|
||||||
void openSubPage();
|
void openSubPage();
|
||||||
void reloadChannelAndSubscriberEmotes();
|
void reloadChannelAndSubscriberEmotes();
|
||||||
|
void reconnect();
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace chatterino
|
} // namespace chatterino
|
||||||
|
|
|
@ -386,7 +386,10 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
||||||
|
|
||||||
// reload / reconnect
|
// reload / reconnect
|
||||||
if (this->split_->getChannel()->canReconnect())
|
if (this->split_->getChannel()->canReconnect())
|
||||||
menu->addAction("Reconnect", this, SLOT(reconnect()));
|
{
|
||||||
|
menu->addAction("Reconnect", this, SLOT(reconnect()),
|
||||||
|
QKeySequence("Ctrl+F5"));
|
||||||
|
}
|
||||||
|
|
||||||
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
|
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue