From 40478d6bac3554e03be6ef0961bc8e49e90dbedb Mon Sep 17 00:00:00 2001 From: "Tux3 / Mlkj / !Lev.uXFMLA" Date: Sun, 25 Jan 2015 17:39:20 +0100 Subject: [PATCH] Show call confirm under video if appropriate --- src/widget/form/chatform.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/widget/form/chatform.cpp b/src/widget/form/chatform.cpp index 02b61dc98..806cb2225 100644 --- a/src/widget/form/chatform.cpp +++ b/src/widget/form/chatform.cpp @@ -265,17 +265,17 @@ void ChatForm::onAvInvite(int FriendId, int CallId, bool video) qDebug() << "onAvInvite"; - callConfirm = new CallConfirmWidget(callButton); - if (isVisible()) - callConfirm->show(); - connect(callConfirm, SIGNAL(accepted()), this, SLOT(onAnswerCallTriggered())); - connect(callConfirm, SIGNAL(rejected()), this, SLOT(onRejectCallTriggered())); - callId = CallId; callButton->disconnect(); videoButton->disconnect(); if (video) { + callConfirm = new CallConfirmWidget(videoButton); + if (isVisible()) + callConfirm->show(); + connect(callConfirm, SIGNAL(accepted()), this, SLOT(onAnswerCallTriggered())); + connect(callConfirm, SIGNAL(rejected()), this, SLOT(onRejectCallTriggered())); + callButton->setObjectName("grey"); callButton->style()->polish(callButton); videoButton->setObjectName("yellow"); @@ -284,6 +284,12 @@ void ChatForm::onAvInvite(int FriendId, int CallId, bool video) } else { + callConfirm = new CallConfirmWidget(callButton); + if (isVisible()) + callConfirm->show(); + connect(callConfirm, SIGNAL(accepted()), this, SLOT(onAnswerCallTriggered())); + connect(callConfirm, SIGNAL(rejected()), this, SLOT(onRejectCallTriggered())); + callButton->setObjectName("yellow"); callButton->style()->polish(callButton); videoButton->setObjectName("grey");