1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Disable call buttons in a lonely groupchat

This commit is contained in:
Flakebi 2015-03-14 17:04:06 +01:00
parent b84d45c896
commit 53589df799

View File

@ -152,6 +152,22 @@ void GroupChatForm::onUserListChanged()
label->setText(label->text() + ", ");
namesListLayout->addWidget(label);
}
// Enable or disable call button
if (group->getPeersCount() != 1)
{
callButton->setEnabled(true);
callButton->setObjectName("green");
callButton->style()->polish(callButton);
callButton->setToolTip(tr("Start audio call"));
}
else
{
callButton->setEnabled(false);
callButton->setObjectName("grey");
callButton->style()->polish(callButton);
callButton->setToolTip("");
}
}
void GroupChatForm::peerAudioPlaying(int peer)