Fixed to hide the Hangup Button by default, only when call is started show

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7547 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2014-09-20 16:44:26 +00:00
parent 6f96443813
commit 2350837bc6

View File

@ -84,6 +84,7 @@ VOIPChatWidgetHolder::VOIPChatWidgetHolder(ChatWidget *chatWidget)
hangupButton->setAutoRaise(true) ; hangupButton->setAutoRaise(true) ;
hangupButton->setText(QString()) ; hangupButton->setText(QString()) ;
hangupButton->setToolTip(tr("Hangup Call")); hangupButton->setToolTip(tr("Hangup Call"));
hangupButton->hide();
connect(videoCaptureToggleButton, SIGNAL(clicked()), this , SLOT(toggleVideoCapture())); connect(videoCaptureToggleButton, SIGNAL(clicked()), this , SLOT(toggleVideoCapture()));
connect(audioListenToggleButton, SIGNAL(clicked()), this , SLOT(toggleAudioListen())); connect(audioListenToggleButton, SIGNAL(clicked()), this , SLOT(toggleAudioListen()));
@ -157,6 +158,7 @@ void VOIPChatWidgetHolder::hangupCall()
} }
audioListenToggleButton->setChecked(false); audioListenToggleButton->setChecked(false);
audioCaptureToggleButton->setChecked(false); audioCaptureToggleButton->setChecked(false);
hangupButton->hide();
} }
void VOIPChatWidgetHolder::toggleAudioCapture() void VOIPChatWidgetHolder::toggleAudioCapture()
@ -165,6 +167,7 @@ void VOIPChatWidgetHolder::toggleAudioCapture()
//activate audio output //activate audio output
audioListenToggleButton->setChecked(true); audioListenToggleButton->setChecked(true);
audioCaptureToggleButton->setToolTip(tr("Hold Call")); audioCaptureToggleButton->setToolTip(tr("Hold Call"));
hangupButton->show();
//activate audio input //activate audio input
if (!inputAudioProcessor) { if (!inputAudioProcessor) {
@ -190,6 +193,7 @@ void VOIPChatWidgetHolder::toggleAudioCapture()
inputAudioDevice->stop(); inputAudioDevice->stop();
} }
audioCaptureToggleButton->setToolTip(tr("Resume Call")); audioCaptureToggleButton->setToolTip(tr("Resume Call"));
hangupButton->hide();
} }
} }
void VOIPChatWidgetHolder::toggleVideoCapture() void VOIPChatWidgetHolder::toggleVideoCapture()