mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
disabled twitch dropdown items for irc chats
This commit is contained in:
parent
b20fdc0da6
commit
158564d0c2
1 changed files with 42 additions and 27 deletions
|
@ -211,9 +211,12 @@ void SplitHeader::initializeLayout()
|
|||
}),
|
||||
// dropdown
|
||||
this->dropdownButton_ = makeWidget<Button>([&](auto w) {
|
||||
/// XXX: this never gets disconnected
|
||||
this->split_->channelChanged.connect([this] {
|
||||
auto menu = this->createMainMenu();
|
||||
this->mainMenu_ = menu.get();
|
||||
w->setMenu(std::move(menu));
|
||||
this->dropdownButton_->setMenu(std::move(menu));
|
||||
});
|
||||
}),
|
||||
// add split
|
||||
this->addButton_ = makeWidget<Button>([&](auto w) {
|
||||
|
@ -275,13 +278,17 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
|||
});
|
||||
#endif
|
||||
|
||||
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
|
||||
{
|
||||
menu->addAction(OPEN_IN_BROWSER, this->split_, &Split::openInBrowser);
|
||||
#ifndef USEWEBENGINE
|
||||
menu->addAction(OPEN_PLAYER_IN_BROWSER, this->split_,
|
||||
&Split::openBrowserPlayer);
|
||||
#endif
|
||||
menu->addAction(OPEN_IN_STREAMLINK, this->split_, &Split::openInStreamlink);
|
||||
menu->addAction(OPEN_IN_STREAMLINK, this->split_,
|
||||
&Split::openInStreamlink);
|
||||
menu->addSeparator();
|
||||
}
|
||||
|
||||
{
|
||||
// "How to..." sub menu
|
||||
|
@ -294,6 +301,8 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
|||
// sub menu
|
||||
auto moreMenu = new QMenu("More", this);
|
||||
|
||||
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
|
||||
{
|
||||
moreMenu->addAction("Show viewer list", this->split_,
|
||||
&Split::showViewerList);
|
||||
|
||||
|
@ -313,7 +322,9 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
|||
});
|
||||
|
||||
moreMenu->addAction(action);
|
||||
}
|
||||
|
||||
if (dynamic_cast<TwitchChannel *>(this->split_->getChannel().get()))
|
||||
{
|
||||
auto action = new QAction(this);
|
||||
action->setText("Mute highlight sound");
|
||||
|
@ -333,10 +344,14 @@ std::unique_ptr<QMenu> SplitHeader::createMainMenu()
|
|||
|
||||
moreMenu->addSeparator();
|
||||
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();
|
||||
|
|
Loading…
Reference in a new issue