mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-30 18:39:23 +00:00
Add option to call only when registered or not in Settings. Deactivated by default.
This commit is contained in:
parent
f0ec8daed0
commit
79703ea51b
21 changed files with 188 additions and 5 deletions
|
|
@ -1693,6 +1693,16 @@ Klik her: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Krydning er obligatorisk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,16 @@ Klicken Sie hier: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Verschlüsselung ist obligatorisch</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1698,6 +1698,16 @@ Click here: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Encryption is mandatory</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation>Hide empty chat rooms</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation>Call when registered</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,16 @@ Haga clic aquí: <a href="%1">%1 </a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>El cifrado es obligatorio</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,16 @@ Cliquez ici : <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Chiffrement obligatoire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1687,6 +1687,16 @@ Kattintson ide: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>A titkosítás kötelező</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,16 @@ Clicca: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>La crittografia è obbligatoria</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1687,6 +1687,16 @@ Ephemeral message is only supported in conference based chat room!'</extrac
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>暗号化を必須にする</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1699,6 +1699,16 @@ Spustelėkite čia: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Šifravimas yra privalomas</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,16 @@ Clique aqui: <a href="%1">%1 </a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>A criptografia é obrigatória</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1699,6 +1699,16 @@ Ephemeral message is only supported in conference based chat room!'</extrac
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Регистрация обязательна</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1693,6 +1693,16 @@ Klicka här: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Kryptering är obligatorisk</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1687,6 +1687,16 @@ Buraya tıklayın: <a href="%1">%1</a>
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Şifreleme zorunludur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1699,6 +1699,16 @@ Ephemeral message is only supported in conference based chat room!'</extrac
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>Обов'язковий заселення</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -1687,6 +1687,16 @@ Ephemeral message is only supported in conference based chat room!'</extrac
|
|||
<source>encryptionMandatoryLabel</source>
|
||||
<translation>硬化是强制性的</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>hideEmptyChatRoomsLabel</source>
|
||||
<extracomment>'Hide empty chat rooms' : Label for a switch to choose if Linphone hide empty chat rooms</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>waitRegistrationForCallLabel</source>
|
||||
<extracomment>'Call when registered' : Label on switch to choose if calls are make when the current proxy is registered</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsLdap</name>
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ void CallsListModel::launchAudioCall (const QString &sipAddress, const QHash<QSt
|
|||
CallModel::setRecordFile(params, Utils::coreStringToAppString(address->getUsername()));
|
||||
shared_ptr<linphone::ProxyConfig> 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<linphone::ProxyConfig> 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();
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ Controls.TextField {
|
|||
property string error: ''
|
||||
property var tools
|
||||
property QtObject textFieldStyle : TextFieldStyle.normal
|
||||
onTextFieldStyleChanged: if( !textFieldStyle) textFieldStyle = TextFieldStyle.normal
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ Controls.Switch {
|
|||
|
||||
property bool enabled: true
|
||||
property QtObject indicatorStyle : SwitchStyle.normal
|
||||
onIndicatorStyleChanged: if( !indicatorStyle) indicatorStyle = SwitchStyle.normal
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue