diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts
index 73cb93c42..1364bc210 100644
--- a/linphone-app/assets/languages/da.ts
+++ b/linphone-app/assets/languages/da.ts
@@ -1693,6 +1693,16 @@ Klik her: <a href="%1">%1</a>
encryptionMandatoryLabel
Krydning er obligatorisk
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts
index 5014cadb3..9fdb62a51 100644
--- a/linphone-app/assets/languages/de.ts
+++ b/linphone-app/assets/languages/de.ts
@@ -1693,6 +1693,16 @@ Klicken Sie hier: <a href="%1">%1</a>
encryptionMandatoryLabel
Verschlüsselung ist obligatorisch
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts
index 65d0d5424..3eef3ed99 100644
--- a/linphone-app/assets/languages/en.ts
+++ b/linphone-app/assets/languages/en.ts
@@ -1698,6 +1698,16 @@ Click here: <a href="%1">%1</a>
encryptionMandatoryLabel
Encryption is mandatory
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+ Hide empty chat rooms
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+ Call when registered
+
SettingsLdap
diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts
index 9e806d904..0ca8fc7c5 100644
--- a/linphone-app/assets/languages/es.ts
+++ b/linphone-app/assets/languages/es.ts
@@ -1693,6 +1693,16 @@ Haga clic aquí: <a href="%1">%1 </a>
encryptionMandatoryLabel
El cifrado es obligatorio
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts
index 5fb777c8e..f729a198d 100644
--- a/linphone-app/assets/languages/fr_FR.ts
+++ b/linphone-app/assets/languages/fr_FR.ts
@@ -1693,6 +1693,16 @@ Cliquez ici : <a href="%1">%1</a>
encryptionMandatoryLabel
Chiffrement obligatoire
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts
index 36549b2bf..5f4b5f462 100644
--- a/linphone-app/assets/languages/hu.ts
+++ b/linphone-app/assets/languages/hu.ts
@@ -1687,6 +1687,16 @@ Kattintson ide: <a href="%1">%1</a>
encryptionMandatoryLabel
A titkosítás kötelező
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts
index cbd212078..9ce799cf5 100644
--- a/linphone-app/assets/languages/it.ts
+++ b/linphone-app/assets/languages/it.ts
@@ -1693,6 +1693,16 @@ Clicca: <a href="%1">%1</a>
encryptionMandatoryLabel
La crittografia è obbligatoria
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts
index e3ac58307..5cca687ac 100644
--- a/linphone-app/assets/languages/ja.ts
+++ b/linphone-app/assets/languages/ja.ts
@@ -1687,6 +1687,16 @@ Ephemeral message is only supported in conference based chat room!'encryptionMandatoryLabel
暗号化を必須にする
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts
index d02ed98a2..96d98d78a 100644
--- a/linphone-app/assets/languages/lt.ts
+++ b/linphone-app/assets/languages/lt.ts
@@ -1699,6 +1699,16 @@ Spustelėkite čia: <a href="%1">%1</a>
encryptionMandatoryLabel
Šifravimas yra privalomas
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts
index 3bd216135..fbd754001 100644
--- a/linphone-app/assets/languages/pt_BR.ts
+++ b/linphone-app/assets/languages/pt_BR.ts
@@ -1693,6 +1693,16 @@ Clique aqui: <a href="%1">%1 </a>
encryptionMandatoryLabel
A criptografia é obrigatória
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts
index c9d139d26..76fcfd0b0 100644
--- a/linphone-app/assets/languages/ru.ts
+++ b/linphone-app/assets/languages/ru.ts
@@ -1699,6 +1699,16 @@ Ephemeral message is only supported in conference based chat room!'encryptionMandatoryLabel
Регистрация обязательна
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts
index 6b246817f..deb6a0fce 100644
--- a/linphone-app/assets/languages/sv.ts
+++ b/linphone-app/assets/languages/sv.ts
@@ -1693,6 +1693,16 @@ Klicka här: <a href="%1">%1</a>
encryptionMandatoryLabel
Kryptering är obligatorisk
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts
index 3aa3c8cc6..9ecba7881 100644
--- a/linphone-app/assets/languages/tr.ts
+++ b/linphone-app/assets/languages/tr.ts
@@ -1687,6 +1687,16 @@ Buraya tıklayın: <a href="%1">%1</a>
encryptionMandatoryLabel
Şifreleme zorunludur
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts
index 55d55954b..9fcbd1e73 100644
--- a/linphone-app/assets/languages/uk.ts
+++ b/linphone-app/assets/languages/uk.ts
@@ -1699,6 +1699,16 @@ Ephemeral message is only supported in conference based chat room!'encryptionMandatoryLabel
Обов'язковий заселення
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts
index 06982c0b0..686f10d82 100644
--- a/linphone-app/assets/languages/zh_CN.ts
+++ b/linphone-app/assets/languages/zh_CN.ts
@@ -1687,6 +1687,16 @@ Ephemeral message is only supported in conference based chat room!'encryptionMandatoryLabel
硬化是强制性的
+
+ hideEmptyChatRoomsLabel
+ 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+
+
+
+ waitRegistrationForCallLabel
+ 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+
+
SettingsLdap
diff --git a/linphone-app/src/components/calls/CallsListModel.cpp b/linphone-app/src/components/calls/CallsListModel.cpp
index 917e14fe4..0be4d8ca4 100644
--- a/linphone-app/src/components/calls/CallsListModel.cpp
+++ b/linphone-app/src/components/calls/CallsListModel.cpp
@@ -120,7 +120,7 @@ void CallsListModel::launchAudioCall (const QString &sipAddress, const QHashgetUsername()));
shared_ptr currentProxyConfig = core->getDefaultProxyConfig();
if(currentProxyConfig){
- if(currentProxyConfig->getState() == linphone::RegistrationState::Ok)
+ if(!CoreManager::getInstance()->getSettingsModel()->getWaitRegistrationForCall() || currentProxyConfig->getState() == linphone::RegistrationState::Ok)
core->inviteAddressWithParams(address, params);
else{
QObject * context = new QObject();
@@ -157,7 +157,7 @@ void CallsListModel::launchSecureAudioCall (const QString &sipAddress, LinphoneE
shared_ptr currentProxyConfig = core->getDefaultProxyConfig();
params->setMediaEncryption(LinphoneEnums::toLinphone(encryption));
if(currentProxyConfig){
- if(currentProxyConfig->getState() == linphone::RegistrationState::Ok)
+ if(!CoreManager::getInstance()->getSettingsModel()->getWaitRegistrationForCall() || currentProxyConfig->getState() == linphone::RegistrationState::Ok)
core->inviteAddressWithParams(address, params);
else{
QObject * context = new QObject();
diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp
index 5a8058035..412944668 100644
--- a/linphone-app/src/components/settings/SettingsModel.cpp
+++ b/linphone-app/src/components/settings/SettingsModel.cpp
@@ -622,6 +622,17 @@ void SettingsModel::setHideEmptyChatRooms(const bool& status){
mConfig->setInt("misc", "hide_empty_chat_rooms", status);
emit hideEmptyChatRoomsChanged(status);
}
+
+// -----------------------------------------------------------------------------
+
+bool SettingsModel::getWaitRegistrationForCall() const{
+ return !!mConfig->getInt(UiSection, "call_wait_registration", 0);
+}
+
+void SettingsModel::setWaitRegistrationForCall(const bool& status){
+ mConfig->setInt(UiSection, "call_wait_registration", status);
+ emit waitRegistrationForCallChanged(status);
+}
// -----------------------------------------------------------------------------
diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp
index 4ca15aa7e..c115cc6f4 100644
--- a/linphone-app/src/components/settings/SettingsModel.hpp
+++ b/linphone-app/src/components/settings/SettingsModel.hpp
@@ -105,7 +105,8 @@ class SettingsModel : public QObject {
Q_PROPERTY(bool chatEnabled READ getChatEnabled WRITE setChatEnabled NOTIFY chatEnabledChanged)
Q_PROPERTY(bool hideEmptyChatRooms READ getHideEmptyChatRooms WRITE setHideEmptyChatRooms NOTIFY hideEmptyChatRoomsChanged)
-
+ Q_PROPERTY(bool waitRegistrationForCall READ getWaitRegistrationForCall WRITE setWaitRegistrationForCall NOTIFY waitRegistrationForCallChanged)// Allow call only if the current proxy has been registered
+
Q_PROPERTY(bool conferenceEnabled READ getConferenceEnabled WRITE setConferenceEnabled NOTIFY conferenceEnabledChanged)
Q_PROPERTY(bool chatNotificationSoundEnabled READ getChatNotificationSoundEnabled WRITE setChatNotificationSoundEnabled NOTIFY chatNotificationSoundEnabledChanged)
@@ -325,6 +326,9 @@ public:
bool getHideEmptyChatRooms() const;
void setHideEmptyChatRooms(const bool& data);
+
+ bool getWaitRegistrationForCall() const;
+ void setWaitRegistrationForCall(const bool& data);
bool getConferenceEnabled () const;
void setConferenceEnabled (bool status);
@@ -542,6 +546,7 @@ signals:
void chatEnabledChanged (bool status);
void hideEmptyChatRoomsChanged (bool status);
+ void waitRegistrationForCallChanged (bool status);
void conferenceEnabledChanged (bool status);
diff --git a/linphone-app/ui/modules/Common/Form/Fields/TextField.qml b/linphone-app/ui/modules/Common/Form/Fields/TextField.qml
index 41794d345..11e127878 100644
--- a/linphone-app/ui/modules/Common/Form/Fields/TextField.qml
+++ b/linphone-app/ui/modules/Common/Form/Fields/TextField.qml
@@ -17,6 +17,7 @@ Controls.TextField {
property string error: ''
property var tools
property QtObject textFieldStyle : TextFieldStyle.normal
+ onTextFieldStyleChanged: if( !textFieldStyle) textFieldStyle = TextFieldStyle.normal
// ---------------------------------------------------------------------------
diff --git a/linphone-app/ui/modules/Common/Form/Switch.qml b/linphone-app/ui/modules/Common/Form/Switch.qml
index 947043a17..db5238588 100644
--- a/linphone-app/ui/modules/Common/Form/Switch.qml
+++ b/linphone-app/ui/modules/Common/Form/Switch.qml
@@ -13,6 +13,7 @@ Controls.Switch {
property bool enabled: true
property QtObject indicatorStyle : SwitchStyle.normal
+ onIndicatorStyleChanged: if( !indicatorStyle) indicatorStyle = SwitchStyle.normal
// ---------------------------------------------------------------------------
diff --git a/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml b/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml
index e026490b0..557b69c48 100644
--- a/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml
+++ b/linphone-app/ui/views/App/Settings/SettingsCallsChat.qml
@@ -187,9 +187,21 @@ TabContainer {
}
FormLine {
- visible: SettingsModel.callRecorderEnabled || SettingsModel.developerSettingsEnabled
+ FormGroup {
+ //: 'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered
+ label: qsTr('waitRegistrationForCallLabel')
+
+ Switch {
+ id: waitRegistrationForCall
+
+ checked: SettingsModel.waitRegistrationForCall
+
+ onClicked: SettingsModel.waitRegistrationForCall = !checked
+ }
+ }
FormGroup {
+ visible: SettingsModel.callRecorderEnabled || SettingsModel.developerSettingsEnabled
label: qsTr('automaticallyRecordCallsLabel')
Switch {
@@ -198,6 +210,7 @@ TabContainer {
onClicked: SettingsModel.automaticallyRecordCalls = !checked
}
}
+
}
}
@@ -268,7 +281,8 @@ TabContainer {
}
FormLine {
FormGroup {
- label: 'Hide empty chat rooms'
+ //: 'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms
+ label: qsTr('hideEmptyChatRoomsLabel')
Switch {
id: hideEmptyChatRooms
@@ -278,6 +292,7 @@ TabContainer {
onClicked: SettingsModel.hideEmptyChatRooms = !checked
}
}
+
}
FormLine {