Commit d802577c authored by Ronan's avatar Ronan

feat(Settings): add an option to disable call pause

parent e3c20a47
Pipeline #210 failed with stage
in 0 seconds
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -404,7 +404,7 @@
<translation>ANRUF WEITERLEITEN</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>ANRUF PAUSIEREN</translation>
</message>
</context>
......@@ -1251,6 +1251,10 @@ Server URL ist nicht konfiguriert.</translation>
<source>keepCallsWindowInBackgroundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -404,7 +404,7 @@
<translation>TRANSFER CALL</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>PAUSE CALL</translation>
</message>
</context>
......@@ -1256,6 +1256,10 @@ your friend&apos;s SIP address or username.</translation>
<source>keepCallsWindowInBackgroundLabel</source>
<translation>Keep calls window in background</translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation>Call pause enabled</translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -404,7 +404,7 @@
<translation>TRANSFERER L&apos;APPEL</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>PAUSE</translation>
</message>
</context>
......@@ -1254,6 +1254,10 @@ Cliquez ici : &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>keepCallsWindowInBackgroundLabel</source>
<translation>Fenêtre d&apos;appels en tâche de fond</translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation>Autoriser la mise en pause</translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -404,7 +404,7 @@
<translation>電話を転送する</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>電話を保留する</translation>
</message>
</context>
......@@ -1251,6 +1251,10 @@
<source>keepCallsWindowInBackgroundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -404,7 +404,7 @@
<translation type="unfinished"></translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>PRISTABDYTI SKAMBUTĮ</translation>
</message>
</context>
......@@ -1256,6 +1256,10 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.</translation>
<source>keepCallsWindowInBackgroundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -404,7 +404,7 @@
<translation>TRANSFERIR LIGAÇÃO</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>PAUSAR LIGAÇÃO</translation>
</message>
</context>
......@@ -1256,6 +1256,10 @@ o endereço SIP ou nome de usuário do seu amigo.</translation>
<source>keepCallsWindowInBackgroundLabel</source>
<translation>Manter as janelas de chamada em segundo plano</translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -404,7 +404,7 @@
<translation>ПЕРНАПРАВИТЬ ВЫЗОВ</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>ПРИОСТАНОВИТЬ ВЫЗОВ</translation>
</message>
</context>
......@@ -1254,6 +1254,10 @@
<source>keepCallsWindowInBackgroundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -404,7 +404,7 @@
<translation>ÖVERFÖR SAMTAL</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>PAUSA SAMTAL</translation>
</message>
</context>
......@@ -1253,6 +1253,10 @@ Klicka här: &lt;a href=&quot;%1&quot;&gt;%1&lt;/a&gt;
<source>keepCallsWindowInBackgroundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -404,7 +404,7 @@
<translation>ÇAĞRIYI AKTAR</translation>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation>ÇAĞRIYI DURAKLAT</translation>
</message>
</context>
......@@ -1253,6 +1253,10 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.</translation>
<source>keepCallsWindowInBackgroundLabel</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>callPauseEnabledLabel</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>SettingsNetwork</name>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -402,7 +402,7 @@
<translation type="unfinished"/>
</message>
<message>
<source>pauseCall</source>
<source>callPause</source>
<translation type="unfinished"/>
</message>
</context>
......
......@@ -409,6 +409,15 @@ void SettingsModel::setAutomaticallyRecordCalls (bool status) {
// -----------------------------------------------------------------------------
bool SettingsModel::getCallPauseEnabled () const {
return !!mConfig->getInt(UiSection, "call_pause_enabled", 1);
}
void SettingsModel::setCallPauseEnabled (bool status) {
mConfig->setInt(UiSection, "call_pause_enabled", status);
emit callPauseEnabledChanged(status);
}
bool SettingsModel::getMuteMicrophoneEnabled () const {
return !!mConfig->getInt(UiSection, "mute_microphone_enabled", 1);
}
......
......@@ -91,6 +91,7 @@ class SettingsModel : public QObject {
Q_PROPERTY(bool callRecorderEnabled READ getCallRecorderEnabled WRITE setCallRecorderEnabled NOTIFY callRecorderEnabledChanged);
Q_PROPERTY(bool automaticallyRecordCalls READ getAutomaticallyRecordCalls WRITE setAutomaticallyRecordCalls NOTIFY automaticallyRecordCallsChanged);
Q_PROPERTY(bool callPauseEnabled READ getCallPauseEnabled WRITE setCallPauseEnabled NOTIFY callPauseEnabledChanged);
Q_PROPERTY(bool muteMicrophoneEnabled READ getMuteMicrophoneEnabled WRITE setMuteMicrophoneEnabled NOTIFY muteMicrophoneEnabledChanged);
Q_PROPERTY(bool chatEnabled READ getChatEnabled WRITE setChatEnabled NOTIFY chatEnabledChanged);
......@@ -280,6 +281,9 @@ public:
bool getAutomaticallyRecordCalls () const;
void setAutomaticallyRecordCalls (bool status);
bool getCallPauseEnabled () const;
void setCallPauseEnabled (bool status);
bool getMuteMicrophoneEnabled () const;
void setMuteMicrophoneEnabled (bool status);
......@@ -473,6 +477,7 @@ signals:
void callRecorderEnabledChanged (bool status);
void automaticallyRecordCallsChanged (bool status);
void callPauseEnabledChanged (bool status);
void muteMicrophoneEnabledChanged (bool status);
void chatEnabledChanged (bool status);
......
......@@ -22,7 +22,7 @@ function getParams (call) {
return {
actions: [{
handler: (function () { call.pausedByUser = true }),
name: qsTr('pauseCall')
name: qsTr('callPause')
}, {
handler: call.askForTransfer,
name: qsTr('transferCall')
......@@ -74,7 +74,7 @@ function getParams (call) {
name: qsTr('resumeCall')
} : {
handler: (function () { call.pausedByUser = true }),
name: qsTr('pauseCall')
name: qsTr('callPause')
}), {
handler: call.askForTransfer,
name: qsTr('transferCall')
......
......@@ -409,6 +409,7 @@ Rectangle {
enabled: !call.pausedByUser
icon: 'pause'
updating: incall.call.updating
visible: SettingsModel.callPauseEnabled
onClicked: incall.call.pausedByUser = enabled
......
......@@ -364,6 +364,7 @@ Window {
enabled: !call.pausedByUser
icon: 'pause'
updating: call.updating
visible: SettingsModel.callPauseEnabled
onClicked: window.exit(function () { call.pausedByUser = enabled })
}
......
......@@ -150,6 +150,20 @@ TabContainer {
}
}
FormGroup {
label: qsTr('callPauseEnabledLabel')
Switch {
checked: SettingsModel.callPauseEnabled
onClicked: SettingsModel.callPauseEnabled = !checked
}
}
}
FormLine {
visible: SettingsModel.developerSettingsEnabled
FormGroup {
label: qsTr('muteMicrophoneEnabledLabel')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment