diff --git a/assets/languages/de.ts b/assets/languages/de.ts
index c30638958..2a3934ede 100644
--- a/assets/languages/de.ts
+++ b/assets/languages/de.ts
@@ -1401,6 +1401,26 @@ Server URL ist nicht konfiguriert.
defaultDisplayNameLabel
Anzeigename
+
+ assistantTitle
+ Assistent
+
+
+ createAppSipAccountEnabledLabel
+
+
+
+ useAppSipAccountEnabledLabel
+
+
+
+ useOtherSipAccountEnabledLabel
+
+
+
+ fetchRemoteConfigurationEnabledLabel
+
+
SettingsSipAccountsEdit
diff --git a/assets/languages/en.ts b/assets/languages/en.ts
index e8ed4953c..6d019361d 100644
--- a/assets/languages/en.ts
+++ b/assets/languages/en.ts
@@ -1406,6 +1406,26 @@ your friend's SIP address or username.
defaultDisplayNameLabel
Display name
+
+ assistantTitle
+ Assistant
+
+
+ createAppSipAccountEnabledLabel
+ Enable account creation
+
+
+ useAppSipAccountEnabledLabel
+ Enable account usage
+
+
+ useOtherSipAccountEnabledLabel
+ Enable generic account usage
+
+
+ fetchRemoteConfigurationEnabledLabel
+ Enable configuration fetch
+
SettingsSipAccountsEdit
diff --git a/assets/languages/fr_FR.ts b/assets/languages/fr_FR.ts
index 7ef202413..99f94f41b 100644
--- a/assets/languages/fr_FR.ts
+++ b/assets/languages/fr_FR.ts
@@ -1404,6 +1404,26 @@ Cliquez ici : <a href="%1">%1</a>
defaultDisplayNameLabel
Nom d'affichage
+
+ assistantTitle
+ Assistant
+
+
+ createAppSipAccountEnabledLabel
+ Activer la création de compte
+
+
+ useAppSipAccountEnabledLabel
+ Activer l'utilisation de compte
+
+
+ useOtherSipAccountEnabledLabel
+ Activer l'utilisation générique de compte
+
+
+ fetchRemoteConfigurationEnabledLabel
+ Activer le téléchargement de conf.
+
SettingsSipAccountsEdit
diff --git a/assets/languages/ja.ts b/assets/languages/ja.ts
index 22b560d60..22974bbdf 100644
--- a/assets/languages/ja.ts
+++ b/assets/languages/ja.ts
@@ -1401,6 +1401,26 @@
defaultDisplayNameLabel
表示名
+
+ assistantTitle
+
+
+
+ createAppSipAccountEnabledLabel
+
+
+
+ useAppSipAccountEnabledLabel
+
+
+
+ useOtherSipAccountEnabledLabel
+
+
+
+ fetchRemoteConfigurationEnabledLabel
+
+
SettingsSipAccountsEdit
diff --git a/assets/languages/lt.ts b/assets/languages/lt.ts
index 1dd8a93a6..ee9b74f57 100644
--- a/assets/languages/lt.ts
+++ b/assets/languages/lt.ts
@@ -1403,6 +1403,26 @@ Tiesiog, įveskite savo draugo SIP adresą ar naudotojo vardą.
defaultDisplayNameLabel
Rodomas vardas
+
+ assistantTitle
+ Pagelbiklis
+
+
+ createAppSipAccountEnabledLabel
+
+
+
+ useAppSipAccountEnabledLabel
+
+
+
+ useOtherSipAccountEnabledLabel
+
+
+
+ fetchRemoteConfigurationEnabledLabel
+
+
SettingsSipAccountsEdit
diff --git a/assets/languages/pt_BR.ts b/assets/languages/pt_BR.ts
index 6a2df8f5b..caddaf764 100644
--- a/assets/languages/pt_BR.ts
+++ b/assets/languages/pt_BR.ts
@@ -1406,6 +1406,26 @@ o endereço SIP ou nome de usuário do seu amigo.
defaultDisplayNameLabel
Exibir nome
+
+ assistantTitle
+ Assistente
+
+
+ createAppSipAccountEnabledLabel
+
+
+
+ useAppSipAccountEnabledLabel
+
+
+
+ useOtherSipAccountEnabledLabel
+
+
+
+ fetchRemoteConfigurationEnabledLabel
+
+
SettingsSipAccountsEdit
diff --git a/assets/languages/ru.ts b/assets/languages/ru.ts
index 70a153d10..6272b18ab 100644
--- a/assets/languages/ru.ts
+++ b/assets/languages/ru.ts
@@ -1401,6 +1401,26 @@
defaultDisplayNameLabel
Отображаемое имя
+
+ assistantTitle
+
+
+
+ createAppSipAccountEnabledLabel
+
+
+
+ useAppSipAccountEnabledLabel
+
+
+
+ useOtherSipAccountEnabledLabel
+
+
+
+ fetchRemoteConfigurationEnabledLabel
+
+
SettingsSipAccountsEdit
diff --git a/assets/languages/sv.ts b/assets/languages/sv.ts
index 29b4b2ba8..50e701cbe 100644
--- a/assets/languages/sv.ts
+++ b/assets/languages/sv.ts
@@ -1403,6 +1403,26 @@ Klicka här: <a href="%1">%1</a>
defaultDisplayNameLabel
Visningsnamn
+
+ assistantTitle
+ Assistent
+
+
+ createAppSipAccountEnabledLabel
+
+
+
+ useAppSipAccountEnabledLabel
+
+
+
+ useOtherSipAccountEnabledLabel
+
+
+
+ fetchRemoteConfigurationEnabledLabel
+
+
SettingsSipAccountsEdit
diff --git a/assets/languages/tr.ts b/assets/languages/tr.ts
index 7c6ca9cc9..b6639ce42 100644
--- a/assets/languages/tr.ts
+++ b/assets/languages/tr.ts
@@ -1403,6 +1403,26 @@ arkadaşınızın SIP adresini veya kullanıcı adını girin.
defaultDisplayNameLabel
Görünen ad
+
+ assistantTitle
+ Yardimci
+
+
+ createAppSipAccountEnabledLabel
+
+
+
+ useAppSipAccountEnabledLabel
+
+
+
+ useOtherSipAccountEnabledLabel
+
+
+
+ fetchRemoteConfigurationEnabledLabel
+
+
SettingsSipAccountsEdit
diff --git a/src/components/settings/SettingsModel.cpp b/src/components/settings/SettingsModel.cpp
index b8efbbc57..305910752 100644
--- a/src/components/settings/SettingsModel.cpp
+++ b/src/components/settings/SettingsModel.cpp
@@ -45,6 +45,46 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) {
configureRlsUri();
}
+// =============================================================================
+// Assistant.
+// =============================================================================
+
+ bool SettingsModel::getUseAppSipAccountEnabled () const {
+ return !!mConfig->getInt(UiSection, "use_app_sip_account_enabled", 1);
+ }
+
+ void SettingsModel::setUseAppSipAccountEnabled (bool status) {
+ mConfig->setInt(UiSection, "use_app_sip_account_enabled", status);
+ emit useAppSipAccountEnabledChanged(status);
+ }
+
+ bool SettingsModel::getUseOtherSipAccountEnabled () const {
+ return !!mConfig->getInt(UiSection, "use_other_sip_account_enabled", 1);
+ }
+
+ void SettingsModel::setUseOtherSipAccountEnabled (bool status) {
+ mConfig->setInt(UiSection, "use_other_sip_account_enabled", status);
+ emit useOtherSipAccountEnabledChanged(status);
+ }
+
+ bool SettingsModel::getCreateAppSipAccountEnabled () const {
+ return !!mConfig->getInt(UiSection, "create_app_sip_account_enabled", 1);
+ }
+
+ void SettingsModel::setCreateAppSipAccountEnabled (bool status) {
+ mConfig->setInt(UiSection, "create_app_sip_account_enabled", status);
+ emit createAppSipAccountEnabledChanged(status);
+ }
+
+ bool SettingsModel::getFetchRemoteConfigurationEnabled () const {
+ return !!mConfig->getInt(UiSection, "fetch_remote_configuration_enabled", 1);
+ }
+
+ void SettingsModel::setFetchRemoteConfigurationEnabled (bool status) {
+ mConfig->setInt(UiSection, "fetch_remote_configuration_enabled", status);
+ emit fetchRemoteConfigurationEnabledChanged(status);
+ }
+
// =============================================================================
// Audio.
// =============================================================================
diff --git a/src/components/settings/SettingsModel.hpp b/src/components/settings/SettingsModel.hpp
index 0e7747c5b..627cb926c 100644
--- a/src/components/settings/SettingsModel.hpp
+++ b/src/components/settings/SettingsModel.hpp
@@ -35,6 +35,13 @@ class SettingsModel : public QObject {
// PROPERTIES.
// ===========================================================================
+ // Assistant. ----------------------------------------------------------------
+
+ Q_PROPERTY(bool createAppSipAccountEnabled READ getCreateAppSipAccountEnabled WRITE setCreateAppSipAccountEnabled NOTIFY createAppSipAccountEnabledChanged);
+ Q_PROPERTY(bool fetchRemoteConfigurationEnabled READ getFetchRemoteConfigurationEnabled WRITE setFetchRemoteConfigurationEnabled NOTIFY fetchRemoteConfigurationEnabledChanged);
+ Q_PROPERTY(bool useAppSipAccountEnabled READ getUseAppSipAccountEnabled WRITE setUseAppSipAccountEnabled NOTIFY useAppSipAccountEnabledChanged);
+ Q_PROPERTY(bool useOtherSipAccountEnabled READ getUseOtherSipAccountEnabled WRITE setUseOtherSipAccountEnabled NOTIFY useOtherSipAccountEnabledChanged);
+
// Audio. --------------------------------------------------------------------
Q_PROPERTY(QStringList captureDevices READ getCaptureDevices CONSTANT);
@@ -171,6 +178,20 @@ public:
// METHODS.
// ===========================================================================
+ // Assistant. ----------------------------------------------------------------
+
+ bool getCreateAppSipAccountEnabled () const;
+ void setCreateAppSipAccountEnabled (bool status);
+
+ bool getFetchRemoteConfigurationEnabled () const;
+ void setFetchRemoteConfigurationEnabled (bool status);
+
+ bool getUseAppSipAccountEnabled () const;
+ void setUseAppSipAccountEnabled (bool status);
+
+ bool getUseOtherSipAccountEnabled () const;
+ void setUseOtherSipAccountEnabled (bool status);
+
// Audio. --------------------------------------------------------------------
QStringList getCaptureDevices () const;
@@ -371,6 +392,13 @@ public:
// ===========================================================================
signals:
+ // Assistant. ----------------------------------------------------------------
+
+ void createAppSipAccountEnabledChanged (bool status);
+ void fetchRemoteConfigurationEnabledChanged (bool status);
+ void useAppSipAccountEnabledChanged (bool status);
+ void useOtherSipAccountEnabledChanged (bool status);
+
// Audio. --------------------------------------------------------------------
void captureDeviceChanged (const QString &device);
diff --git a/ui/views/App/Main/Assistant/AssistantHome.qml b/ui/views/App/Main/Assistant/AssistantHome.qml
index 176ac39a3..aeba186e7 100644
--- a/ui/views/App/Main/Assistant/AssistantHome.qml
+++ b/ui/views/App/Main/Assistant/AssistantHome.qml
@@ -2,6 +2,7 @@ import QtQuick 2.7
import QtQuick.Layouts 1.3
import Common 1.0
+import Linphone 1.0
import App.Styles 1.0
@@ -90,6 +91,7 @@ ColumnLayout {
}
text: $text.replace('%1', Qt.application.name.toUpperCase())
+ enabled: SettingsModel[$view.charAt(0).toLowerCase() + $view.slice(1) + "Enabled"];
onClicked: assistant.pushView($view)
}
diff --git a/ui/views/App/Settings/SettingsSipAccounts.qml b/ui/views/App/Settings/SettingsSipAccounts.qml
index 47f40b430..b3b3a548a 100644
--- a/ui/views/App/Settings/SettingsSipAccounts.qml
+++ b/ui/views/App/Settings/SettingsSipAccounts.qml
@@ -122,5 +122,59 @@ TabContainer {
onClicked: Logic.editAccount()
}
}
+
+ // -------------------------------------------------------------------------
+ // Assistant.
+ // -------------------------------------------------------------------------
+
+ Form {
+ title: qsTr('assistantTitle')
+ visible: SettingsModel.developerSettingsEnabled
+ width: parent.width
+
+ FormLine {
+ FormGroup {
+ label: qsTr('createAppSipAccountEnabledLabel')
+
+ Switch {
+ checked: SettingsModel.createAppSipAccountEnabled
+
+ onClicked: SettingsModel.createAppSipAccountEnabled = !checked
+ }
+ }
+
+ FormGroup {
+ label: qsTr('useAppSipAccountEnabledLabel')
+
+ Switch {
+ checked: SettingsModel.useAppSipAccountEnabled
+
+ onClicked: SettingsModel.useAppSipAccountEnabled = !checked
+ }
+ }
+ }
+
+ FormLine {
+ FormGroup {
+ label: qsTr('useOtherSipAccountEnabledLabel')
+
+ Switch {
+ checked: SettingsModel.useOtherSipAccountEnabled
+
+ onClicked: SettingsModel.useOtherSipAccountEnabled = !checked
+ }
+ }
+
+ FormGroup {
+ label: qsTr('fetchRemoteConfigurationEnabledLabel')
+
+ Switch {
+ checked: SettingsModel.fetchRemoteConfigurationEnabled
+
+ onClicked: SettingsModel.fetchRemoteConfigurationEnabled = !checked
+ }
+ }
+ }
+ }
}
}