feat(Settings): hide some options when video, chat or call record are not available

This commit is contained in:
Ronan Abhamon 2018-04-18 10:07:17 +02:00
parent 972f9aeafa
commit 68e5eeb817
4 changed files with 11 additions and 3 deletions

View file

@ -384,7 +384,7 @@ void CallModel::acceptWithAutoAnswerDelay () {
// Use auto-answer if activated and it's the only call.
if (settingsModel->getAutoAnswerStatus() && coreManager->getCore()->getCallsNb() == 1) {
if (mCall->getRemoteParams()->videoEnabled() && settingsModel->getAutoAnswerVideoStatus())
if (mCall->getRemoteParams()->videoEnabled() && settingsModel->getAutoAnswerVideoStatus() && settingsModel->getVideoSupported())
acceptWithVideo();
else
accept();

View file

@ -90,6 +90,7 @@ TabContainer {
FormLine {
FormGroup {
label: qsTr('autoAnswerWithVideoLabel')
visible: SettingsModel.videoSupported
Switch {
checked: SettingsModel.autoAnswerVideoStatus

View file

@ -250,6 +250,7 @@ TabContainer {
readonly property int defaultPort: 9078
title: qsTr('videoRtpUdpPortLabel')
visible: SettingsModel.videoSupported
FormTableEntry {
PortField {
@ -401,6 +402,7 @@ TabContainer {
FormGroup {
label: qsTr('videoRtpStreamFieldLabel')
visible: SettingsModel.videoSupported
HexField {
text: SettingsModel.dscpVideo

View file

@ -58,9 +58,12 @@ TabContainer {
Form {
title: qsTr('pathsTitle')
visible: SettingsModel.videoSupported || SettingsModel.callRecorderEnabled || SettingsModel.chatEnabled
width: parent.width
FormLine {
visible: SettingsModel.videoSupported
FormGroup {
label: qsTr('savedScreenshotsLabel')
@ -74,6 +77,8 @@ TabContainer {
}
FormLine {
visible: SettingsModel.callRecorderEnabled
FormGroup {
label: qsTr('savedVideosLabel')
@ -87,6 +92,8 @@ TabContainer {
}
FormLine {
visible: SettingsModel.chatEnabled
FormGroup {
label: qsTr('downloadLabel')
@ -131,8 +138,6 @@ TabContainer {
label: qsTr('exitOnCloseLabel')
Switch {
id: autoAnswer
checked: SettingsModel.exitOnClose
onClicked: SettingsModel.exitOnClose = !checked