edited split dropdown

This commit is contained in:
fourtf
2020-08-13 18:02:23 +02:00
parent 8661c83312
commit 2c74e98023
5 changed files with 45 additions and 13 deletions
+18 -12
View File
@@ -277,7 +277,8 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
menu->addAction("Close", this->split_, &Split::deleteFromContainer,
QKeySequence("Ctrl+W"));
menu->addSeparator();
menu->addAction("Popup", this->split_, &Split::popup);
menu->addAction("Popup", this->split_, &Split::popup,
QKeySequence("Ctrl+N"));
menu->addAction("Search", this->split_, &Split::showSearch,
QKeySequence("Ctrl+F"));
menu->addSeparator();
@@ -323,6 +324,20 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
menu->addSeparator();
}
// reload / reconnect
if (this->split_->getChannel()->canReconnect())
menu->addAction("Reconnect", this, SLOT(reconnect()));
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
{
menu->addAction("Reload channel emotes", this,
SLOT(reloadChannelEmotes()), QKeySequence("F5"));
menu->addAction("Reload subscriber emotes", this,
SLOT(reloadSubscriberEmotes()));
}
menu->addSeparator();
{
// "How to..." sub menu
auto subMenu = new QMenu("How to...", this);
@@ -331,6 +346,8 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
menu->addMenu(subMenu);
}
menu->addSeparator();
// sub menu
auto moreMenu = new QMenu("More", this);
@@ -379,17 +396,6 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
moreMenu->addAction(action);
}
moreMenu->addSeparator();
if (this->split_->getChannel()->canReconnect())
moreMenu->addAction("Reconnect", this, SLOT(reconnect()));
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
{
moreMenu->addAction("Reload channel emotes", this,
SLOT(reloadChannelEmotes()));
moreMenu->addAction("Reload subscriber emotes", this,
SLOT(reloadSubscriberEmotes()));
}
moreMenu->addSeparator();
moreMenu->addAction("Clear messages", this->split_, &Split::clear);
// moreMenu->addSeparator();