mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-02-04 05:09:27 +00:00
- Add an hidden option to activate ephemeral on chat creation (create_ephemeral_chat_rooms=<seconds>)
- Add a placeholder in contacts for display name and resize empty box to placeholder size. - Fix account name alignment. - Hide records menu if option has been deactivated.
This commit is contained in:
parent
73a3478e21
commit
bbae9ecb4c
24 changed files with 117 additions and 7 deletions
|
|
@ -1008,6 +1008,11 @@
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1003,6 +1003,11 @@ Server url ikke konfigureret.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -625,7 +625,7 @@ Server URL ist nicht konfiguriert.</translation>
|
|||
<message>
|
||||
<source>icsCancelledMeetingInvite</source>
|
||||
<extracomment>'Meeting has been cancelled' : ICS title for a cancelled invitation.</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation type="unfinished">Das Treffen wurde storniert</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
|
@ -1003,6 +1003,11 @@ Server URL ist nicht konfiguriert.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1003,6 +1003,11 @@ Server URL not configured.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation>USERNAME(S)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation>Display Name</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1003,6 +1003,11 @@ URL del servidor no configurada.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1003,6 +1003,11 @@ URL du serveur non configurée.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation>Nom(s) d'utilisateur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation>Nom d'affichage</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -997,6 +997,11 @@ A kiszolgáló URL-je nincs konfigurálva.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1003,6 +1003,11 @@ URL del server non configurato.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -997,6 +997,11 @@
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,11 @@ Nesukonfigūruotas serverio url.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1003,6 +1003,11 @@ URL do servidor não configurado.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,11 @@
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1003,6 +1003,11 @@ Serverwebbadressen är inte konfigurerad.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -997,6 +997,11 @@ Sunucu url'si yapılandırılmadı.</translation>
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -1009,6 +1009,11 @@
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -997,6 +997,11 @@
|
|||
<extracomment>'USERNAME(S)' : label for sip accounts when only username is displayed n contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<source>displayName</source>
|
||||
<extracomment>'Display Name' : placeholder for setting display name on a contact</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Contacts</name>
|
||||
|
|
|
|||
|
|
@ -260,6 +260,9 @@ bool CallsListModel::createSecureChat (const QString& subject, const QString &pa
|
|||
std::list <shared_ptr<linphone::Address> > participants;
|
||||
std::shared_ptr<const linphone::Address> localAddress;
|
||||
participants.push_back(address);
|
||||
int ephemeralTime = CoreManager::getInstance()->getSettingsModel()->getCreateEphemeralChatRooms();
|
||||
if(ephemeralTime>0)
|
||||
params->setEphemeralLifetime(ephemeralTime);
|
||||
params->enableEncryption(true);
|
||||
|
||||
params->setSubject(Utils::appStringToCoreString(subject));
|
||||
|
|
@ -268,6 +271,8 @@ bool CallsListModel::createSecureChat (const QString& subject, const QString &pa
|
|||
|
||||
qInfo() << "Create secure ChatRoom: " << subject << ", from " << QString::fromStdString(localAddress->asString()) << " and with " <<participantAddress;;
|
||||
std::shared_ptr<linphone::ChatRoom> chatRoom = core->createChatRoom(params, localAddress, participants);
|
||||
if(chatRoom)
|
||||
chatRoom->enableEphemeral(ephemeralTime>0);
|
||||
// Still needed?
|
||||
// if( chatRoom != nullptr){
|
||||
// auto timelineList = CoreManager::getInstance()->getTimelineListModel();
|
||||
|
|
@ -318,6 +323,9 @@ QVariantMap CallsListModel::createChatRoom(const QString& subject, const int& se
|
|||
qWarning() << "Failed to add participant to conference, bad address : " << (participant ? participant->getSipAddress() : p.toString());
|
||||
}
|
||||
params->enableEncryption(securityLevel>0);
|
||||
int ephemeralTime = CoreManager::getInstance()->getSettingsModel()->getCreateEphemeralChatRooms();
|
||||
if(securityLevel > 0 && ephemeralTime>0)
|
||||
params->setEphemeralLifetime(ephemeralTime);
|
||||
|
||||
if( securityLevel<=0)
|
||||
params->setBackend(linphone::ChatRoomBackend::Basic);
|
||||
|
|
@ -365,6 +373,8 @@ QVariantMap CallsListModel::createChatRoom(const QString& subject, const int& se
|
|||
}
|
||||
if( !chatRoom)
|
||||
qWarning() << "Chat room cannot be created";
|
||||
else if(securityLevel > 0)
|
||||
chatRoom->enableEphemeral(ephemeralTime>0);
|
||||
result["created"] = (chatRoom != nullptr);
|
||||
|
||||
return result;
|
||||
|
|
|
|||
|
|
@ -1140,6 +1140,17 @@ void SettingsModel::setContactsEnabled (bool status) {
|
|||
int SettingsModel::getIncomingCallTimeout() const {
|
||||
return CoreManager::getInstance()->getCore()->getIncTimeout();
|
||||
}
|
||||
|
||||
int SettingsModel::getCreateEphemeralChatRooms() const{
|
||||
return mConfig->getInt(UiSection, "create_ephemeral_chat_rooms", 0);
|
||||
}
|
||||
|
||||
void SettingsModel::setCreateEphemeralChatRooms(int seconds) {
|
||||
if(!isReadOnly(UiSection, "create_ephemeral_chat_rooms"))
|
||||
mConfig->setInt(UiSection, "create_ephemeral_chat_rooms", seconds);
|
||||
emit createEphemeralsChatRoomsChanged();
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// Network.
|
||||
// =============================================================================
|
||||
|
|
|
|||
|
|
@ -501,6 +501,9 @@ public:
|
|||
|
||||
int getIncomingCallTimeout() const;
|
||||
|
||||
int getCreateEphemeralChatRooms() const;
|
||||
void setCreateEphemeralChatRooms(int seconds);// <=0 deactivate
|
||||
|
||||
// Network. ------------------------------------------------------------------
|
||||
|
||||
bool getShowNetworkSettings () const;
|
||||
|
|
@ -594,7 +597,7 @@ public:
|
|||
void setDownloadFolder (const QString &folder);
|
||||
|
||||
QString getRemoteProvisioningRootUrl() const;
|
||||
QString getRemoteProvisioning () const;
|
||||
Q_INVOKABLE QString getRemoteProvisioning () const;
|
||||
void setRemoteProvisioning (const QString &remoteProvisioning);
|
||||
|
||||
Q_INVOKABLE bool isQRCodeAvailable() const;
|
||||
|
|
@ -804,6 +807,8 @@ signals:
|
|||
|
||||
void contactsEnabledChanged (bool status);
|
||||
|
||||
void createEphemeralsChatRoomsChanged();
|
||||
|
||||
// Network. ------------------------------------------------------------------
|
||||
|
||||
void showNetworkSettingsChanged (bool status);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Item {
|
|||
'transparent'
|
||||
height: parent.height
|
||||
width: {
|
||||
var width = textInput.contentWidth + parent.padding * 2
|
||||
var width = Math.max(textInput.contentWidth, placeholder.contentWidth) + parent.padding * 2
|
||||
return width < parent.width ? width : parent.width
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ Item {
|
|||
Text {
|
||||
id:username
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: accountStatus.noAccountConfigured ? -1 : parent.height / 2
|
||||
Layout.preferredHeight: accountStatus.noAccountConfigured ? -1 : subtitle.visible ? parent.height / 2 : parent.height
|
||||
Layout.alignment: !subtitle.visible ? Qt.AlignVCenter | Qt.AlignLeft : Qt.AlignBottom | Qt.AlignLeft
|
||||
color: AccountStatusStyle.username.colorModel.color
|
||||
elide: Text.ElideRight
|
||||
|
|
@ -78,7 +78,7 @@ Item {
|
|||
font.pointSize: AccountStatusStyle.username.pointSize
|
||||
//: 'No account configured' : Status text when there is no configured account.
|
||||
text: accountStatus.noAccountConfigured ? qsTr('noAccount'): AccountSettingsModel.username
|
||||
verticalAlignment: Text.AlignBottom
|
||||
verticalAlignment: subtitle.visible ? Text.AlignBottom : Text.AlignVCenter
|
||||
wrapMode: Text.WordWrap
|
||||
maximumLineCount: 3
|
||||
}
|
||||
|
|
@ -106,7 +106,7 @@ Item {
|
|||
|
||||
Text {
|
||||
id: subtitle
|
||||
Layout.preferredHeight:parent.height / 2
|
||||
Layout.preferredHeight: visible ? parent.height / 2 : 0
|
||||
Layout.preferredWidth:parent.width
|
||||
visible: !accountStatus.noAccountConfigured && text != username.text
|
||||
color: AccountStatusStyle.sipAddress.colorModel.color
|
||||
|
|
|
|||
|
|
@ -133,6 +133,8 @@ ColumnLayout {
|
|||
forceFocus: true
|
||||
readOnly: !_edition
|
||||
text: avatar.username
|
||||
//: 'Display Name' : placeholder for setting display name on a contact
|
||||
placeholder: qsTr('displayName')
|
||||
font.family: SettingsModel.textMessageFont.family
|
||||
|
||||
onEditingFinished: Logic.setUsername(text)
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ Item {
|
|||
|
||||
Shortcut {
|
||||
id: recordingsShortcut
|
||||
onActivated: menuParent.displayRecordings()
|
||||
onActivated: if(SettingsModel.callRecorderEnabled) menuParent.displayRecordings()
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
@ -75,6 +75,7 @@ Item {
|
|||
}
|
||||
|
||||
MenuItem{
|
||||
visible: SettingsModel.callRecorderEnabled
|
||||
//: 'Recordings' : Label for the recordings menu.
|
||||
text: qsTr('recordings')
|
||||
onTriggered: recordingsShortcut.onActivated()
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ MenuBar {
|
|||
}
|
||||
|
||||
MenuItem {
|
||||
visible: SettingsModel.callRecorderEnabled
|
||||
//: 'Recordings' : Label for the recordings menu.
|
||||
text: qsTr('recordings')
|
||||
role: MenuItem.ApplicationSpecificRole
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue