1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00
This commit is contained in:
dubslow 2014-10-14 20:04:53 -05:00
parent f2f572273c
commit a0ca379c1b
3 changed files with 18 additions and 1 deletions

View File

@ -64,6 +64,8 @@ public:
void increaseVideoBusyness();
void decreaseVideoBusyness();
bool anyActiveCalls();
public slots:
void start();
void process();

View File

@ -28,6 +28,14 @@ ALCdevice* Core::alOutDev, *Core::alInDev;
ALCcontext* Core::alContext;
ALuint Core::alMainSource;
bool Core::anyActiveCalls()
{
for (auto& call : calls)
if (call.active)
return true;
return false;
}
void Core::prepareCall(int friendId, int callId, ToxAv* toxav, bool videoEnabled)
{
qDebug() << QString("Core: preparing call %1").arg(callId);

View File

@ -108,7 +108,14 @@ void IdentityForm::setStatusMessage(const QString &msg)
void IdentityForm::onLoadClicked()
{
Core::getInstance()->switchConfiguration(bodyUI->profiles->currentText());
if (bodyUI->profiles->currentText() != Settings::getInstance().getCurrentProfile())
{
if (Core::getInstance()->anyActiveCalls())
QMessageBox::warning(this, tr("Call active", "popup title"),
tr("You can't switch profiles while a call is active!", "popup text"));
else
Core::getInstance()->switchConfiguration(bodyUI->profiles->currentText());
}
}
void IdentityForm::onRenameClicked()