mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-19 20:48:09 +00:00
feat(Settings): add an developer option to disable outgoing calls
This commit is contained in:
parent
af75a235f2
commit
9cb3879395
16 changed files with 80 additions and 4 deletions
|
|
@ -1230,6 +1230,10 @@ Klicken Sie hier: <a href="%1">%1</a>
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1232,6 +1232,10 @@ your friend's SIP address or username.</translation>
|
|||
<source>muteMicrophoneEnabledLabel</source>
|
||||
<translation>Enable mute microphone</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation>Enable outgoing call</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1230,6 +1230,10 @@ Cliquez ici : <a href="%1">%1</a>
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation>Activer les contacts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation>Activer les appels sortants</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1227,6 +1227,10 @@
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1232,6 +1232,10 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.</translation>
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1232,6 +1232,10 @@ o endereço SIP ou nome de usuário do seu amigo.</translation>
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1230,6 +1230,10 @@
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1229,6 +1229,10 @@ Klicka här: <a href="%1">%1</a>
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -1232,6 +1232,10 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.</translation>
|
|||
<source>contactsEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>outgoingCallEnabledLabel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsNetwork</name>
|
||||
|
|
|
|||
|
|
@ -281,6 +281,17 @@ void SettingsModel::setAutoAnswerVideoStatus (bool status) {
|
|||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool SettingsModel::getOutgoingCallEnabled () const {
|
||||
return !!mConfig->getInt(UiSection, "outgoing_call_enabled", 1);
|
||||
}
|
||||
|
||||
void SettingsModel::setOutgoingCallEnabled (bool status) {
|
||||
mConfig->setInt(UiSection, "outgoing_call_enabled", status);
|
||||
emit outgoingCallEnabledChanged(status);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
bool SettingsModel::getCallRecorderEnabled () const {
|
||||
return !!mConfig->getInt(UiSection, "call_recorder_enabled", 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ class SettingsModel : public QObject {
|
|||
Q_PROPERTY(bool autoAnswerVideoStatus READ getAutoAnswerVideoStatus WRITE setAutoAnswerVideoStatus NOTIFY autoAnswerVideoStatusChanged);
|
||||
Q_PROPERTY(int autoAnswerDelay READ getAutoAnswerDelay WRITE setAutoAnswerDelay NOTIFY autoAnswerDelayChanged);
|
||||
|
||||
Q_PROPERTY(bool outgoingCallEnabled READ getOutgoingCallEnabled WRITE setOutgoingCallEnabled NOTIFY outgoingCallEnabledChanged);
|
||||
|
||||
Q_PROPERTY(bool callRecorderEnabled READ getCallRecorderEnabled WRITE setCallRecorderEnabled NOTIFY callRecorderEnabledChanged);
|
||||
|
||||
Q_PROPERTY(bool muteMicrophoneEnabled READ getMuteMicrophoneEnabled WRITE setMuteMicrophoneEnabled NOTIFY muteMicrophoneEnabledChanged);
|
||||
|
|
@ -220,6 +222,9 @@ public:
|
|||
int getAutoAnswerDelay () const;
|
||||
void setAutoAnswerDelay (int delay);
|
||||
|
||||
bool getOutgoingCallEnabled () const;
|
||||
void setOutgoingCallEnabled (bool status);
|
||||
|
||||
bool getCallRecorderEnabled () const;
|
||||
void setCallRecorderEnabled (bool status);
|
||||
|
||||
|
|
@ -391,6 +396,8 @@ signals:
|
|||
void autoAnswerVideoStatusChanged (bool status);
|
||||
void autoAnswerDelayChanged (int delay);
|
||||
|
||||
void outgoingCallEnabledChanged (bool status);
|
||||
|
||||
void callRecorderEnabledChanged (bool status);
|
||||
|
||||
void muteMicrophoneEnabledChanged (bool status);
|
||||
|
|
|
|||
|
|
@ -43,13 +43,14 @@ SearchBox {
|
|||
searchBox.closeMenu()
|
||||
searchBox.launchVideoCall(entry.sipAddress)
|
||||
},
|
||||
visible: SettingsModel.videoSupported
|
||||
visible: SettingsModel.videoSupported && SettingsModel.outgoingCallEnabled
|
||||
}, {
|
||||
icon: 'call',
|
||||
handler: function (entry) {
|
||||
searchBox.closeMenu()
|
||||
searchBox.launchCall(entry.sipAddress)
|
||||
}
|
||||
},
|
||||
visible: SettingsModel.outgoingCallEnabled
|
||||
}, {
|
||||
icon: SettingsModel.chatEnabled ? 'chat' : 'history',
|
||||
handler: function (entry) {
|
||||
|
|
|
|||
|
|
@ -88,6 +88,8 @@ Window {
|
|||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: CallsWindowStyle.callsList.header.height
|
||||
|
||||
visible: SettingsModel.outgoingCallEnabled || SettingsModel.conferenceEnabled
|
||||
|
||||
LinearGradient {
|
||||
anchors.fill: parent
|
||||
|
||||
|
|
@ -111,6 +113,7 @@ Window {
|
|||
|
||||
ActionButton {
|
||||
icon: 'new_call'
|
||||
visible: SettingsModel.outgoingCallEnabled
|
||||
|
||||
onClicked: Logic.openCallSipAddress()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,13 +132,15 @@ ColumnLayout {
|
|||
|
||||
ActionButton {
|
||||
icon: 'video_call'
|
||||
visible: SettingsModel.videoSupported
|
||||
visible: SettingsModel.videoSupported && SettingsModel.outgoingCallEnabled
|
||||
|
||||
onClicked: actions.itemAt(0).open()
|
||||
}
|
||||
|
||||
ActionButton {
|
||||
icon: 'call'
|
||||
visible: SettingsModel.outgoingCallEnabled
|
||||
|
||||
onClicked: actions.itemAt(1).open()
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -75,13 +75,15 @@ ColumnLayout {
|
|||
|
||||
ActionButton {
|
||||
icon: 'video_call'
|
||||
visible: SettingsModel.videoSupported
|
||||
visible: SettingsModel.videoSupported && SettingsModel.outgoingCallEnabled
|
||||
|
||||
onClicked: CallsListModel.launchVideoCall(conversation.sipAddress)
|
||||
}
|
||||
|
||||
ActionButton {
|
||||
icon: 'call'
|
||||
visible: SettingsModel.outgoingCallEnabled
|
||||
|
||||
onClicked: CallsListModel.launchAudioCall(conversation.sipAddress)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -101,6 +101,20 @@ TabContainer {
|
|||
}
|
||||
}
|
||||
|
||||
FormLine {
|
||||
visible: SettingsModel.developerSettingsEnabled
|
||||
|
||||
FormGroup {
|
||||
label: qsTr('outgoingCallEnabledLabel')
|
||||
|
||||
Switch {
|
||||
checked: SettingsModel.outgoingCallEnabled
|
||||
|
||||
onClicked: SettingsModel.outgoingCallEnabled = !checked
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FormLine {
|
||||
visible: SettingsModel.developerSettingsEnabled
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue