Multi fixes:

- Contact update propagated through timelines and more robust display name showing by using cpp.
- ContactEdit : don't use the conference URI when adding the contact to friend on secure chat room
- Conference View : Resize record, add record file notification.
- Group Chat : timed invitation (30s) where it will hide if no response. It will be shown if the participant accept later.
- Hide/Show empty chats : set defaults to avoid differences from SDK value.
- Calls actions : Dynamic width on transfer menu to show all text, set texts to uppercase.
- Timeline : Add a tooltip (right-clic) to show the last time update.
- File Messages : add search shortcut on avatar like messages, remove conflicts between right-clic menu and thumbnails increase (on hovering mouse).
- Call : hold view with a correct symbol (#10073 instead of 2 differents symbols for 2 vertical bars)
- Languages : remove '-----' artifacts in language files
This commit is contained in:
Julien Wadel 2021-10-08 21:06:20 +02:00
parent 8118a1c722
commit eabe561dff
39 changed files with 252 additions and 215 deletions

View file

@ -993,9 +993,7 @@ Server url ikke konfigureret.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -993,9 +993,7 @@ Server URL ist nicht konfiguriert.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -983,9 +983,7 @@ URL del servidor no configurada.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -993,9 +993,7 @@ URL du serveur non configurée.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation>
<numerusform>%1 jour</numerusform>
<numerusform>%1 jours</numerusform>

View file

@ -986,9 +986,7 @@ A kiszolgáló URL-je nincs konfigurálva.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation>
<numerusform>%1 nap</numerusform>
</translation>

View file

@ -993,9 +993,7 @@ URL del server non configurato.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -986,9 +986,7 @@
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
</translation>

View file

@ -1000,9 +1000,7 @@ Nesukonfigūruotas serverio url.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -993,9 +993,7 @@ URL do servidor não configurado.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -1000,9 +1000,7 @@
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -993,9 +993,7 @@ Serverwebbadressen är inte konfigurerad.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -986,9 +986,7 @@ Sunucu url&apos;si yapılandırılmadı.</translation>
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
</translation>

View file

@ -1000,9 +1000,7 @@
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>

View file

@ -986,9 +986,7 @@
</message>
<message numerus="yes">
<source>nDay</source>
<extracomment>&apos;%1 day&apos;
----------
&apos;%1 days&apos;</extracomment>
<extracomment>&apos;%1 day&apos;</extracomment>
<translation type="unfinished">
<numerusform></numerusform>
</translation>

View file

@ -223,8 +223,13 @@ ChatRoomModel::ChatRoomModel (std::shared_ptr<linphone::ChatRoom> chatRoom, QObj
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactAdded, this, &ChatRoomModel::usernameChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactAdded, this, &ChatRoomModel::fullPeerAddressChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactAdded, this, &ChatRoomModel::avatarChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactRemoved, this, &ChatRoomModel::usernameChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactRemoved, this, &ChatRoomModel::fullPeerAddressChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactRemoved, this, &ChatRoomModel::avatarChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactUpdated, this, &ChatRoomModel::usernameChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactUpdated, this, &ChatRoomModel::fullPeerAddressChanged);
QObject::connect(coreManager->getContactsListModel(), &ContactsListModel::contactUpdated, this, &ChatRoomModel::avatarChanged);
//QObject::connect(this, &ChatRoomModel::messageCountReset, coreManager, &CoreManager::eventCountChanged );
@ -1070,6 +1075,7 @@ void ChatRoomModel::onChatMessageSent(const std::shared_ptr<linphone::ChatRoom>
updateLastUpdateTime();
}
// Called when the core have the participant (= exists)
void ChatRoomModel::onParticipantAdded(const std::shared_ptr<linphone::ChatRoom> & chatRoom, const std::shared_ptr<const linphone::EventLog> & eventLog){
auto events = chatRoom->getHistoryEvents(0);
auto e = std::find(events.begin(), events.end(), eventLog);

View file

@ -287,7 +287,7 @@ signals:
void participantsChanged();
void subjectChanged(QString subject);
void usernameChanged();
void avatarChanged(QString avatar);
void avatarChanged();
void presenceStatusChanged();
void lastUpdateTimeChanged();
void unreadMessagesCountChanged();

View file

@ -21,10 +21,12 @@
#include <QDateTime>
#include <QtDebug>
#include "app/App.hpp"
#include "components/call/CallModel.hpp"
#include "components/calls/CallsListModel.hpp"
#include "components/core/CoreHandlers.hpp"
#include "components/core/CoreManager.hpp"
#include "components/notifier/Notifier.hpp"
#include "components/settings/SettingsModel.hpp"
#include "utils/MediastreamerUtils.hpp"
#include "utils/Utils.hpp"
@ -76,13 +78,11 @@ void ConferenceModel::startRecording () {
qInfo() << QStringLiteral("Start recording conference:") << this;
CoreManager *coreManager = CoreManager::getInstance();
coreManager->getCore()->startConferenceRecording(
Utils::appStringToCoreString(
mLastRecordFile =
QStringLiteral("%1%2.mkv")
.arg(coreManager->getSettingsModel()->getSavedCallsFolder())
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss"))
)
);
.arg(QDateTime::currentDateTime().toString("yyyy-MM-dd_hh-mm-ss"));
coreManager->getCore()->startConferenceRecording(Utils::appStringToCoreString(mLastRecordFile) );
mRecording = true;
emit recordingChanged(true);
@ -95,7 +95,9 @@ void ConferenceModel::stopRecording () {
qInfo() << QStringLiteral("Stop recording conference:") << this;
mRecording = false;
CoreManager::getInstance()->getCore()->stopConferenceRecording();
App::getInstance()->getNotifier()->notifyRecordingCompleted(mLastRecordFile);
emit recordingChanged(false);
}

View file

@ -28,51 +28,52 @@
class CallModel;
class ConferenceModel : public QSortFilterProxyModel {
Q_OBJECT;
Q_PROPERTY(int count READ getCount NOTIFY countChanged);
Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
Q_PROPERTY(float microVu READ getMicroVu CONSTANT);
Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
Q_PROPERTY(bool isInConf READ isInConference NOTIFY conferenceChanged);
Q_OBJECT;
Q_PROPERTY(int count READ getCount NOTIFY countChanged);
Q_PROPERTY(bool microMuted READ getMicroMuted WRITE setMicroMuted NOTIFY microMutedChanged);
Q_PROPERTY(float microVu READ getMicroVu CONSTANT);
Q_PROPERTY(bool recording READ getRecording NOTIFY recordingChanged);
Q_PROPERTY(bool isInConf READ isInConference NOTIFY conferenceChanged);
public:
ConferenceModel (QObject *parent = Q_NULLPTR);
ConferenceModel (QObject *parent = Q_NULLPTR);
protected:
bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override;
Q_INVOKABLE void terminate ();
Q_INVOKABLE void startRecording ();
Q_INVOKABLE void stopRecording ();
Q_INVOKABLE void join ();
Q_INVOKABLE void leave ();
bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override;
Q_INVOKABLE void terminate ();
Q_INVOKABLE void startRecording ();
Q_INVOKABLE void stopRecording ();
Q_INVOKABLE void join ();
Q_INVOKABLE void leave ();
signals:
void countChanged (int count);
void microMutedChanged (bool status);
void recordingChanged (bool status);
void conferenceChanged ();
void countChanged (int count);
void microMutedChanged (bool status);
void recordingChanged (bool status);
void conferenceChanged ();
private:
int getCount () const {
return rowCount();
}
bool getMicroMuted () const;
void setMicroMuted (bool status);
float getMicroVu () const;
bool isInConference () const;
bool getRecording () const;
bool mRecording = false;
int getCount () const {
return rowCount();
}
bool getMicroMuted () const;
void setMicroMuted (bool status);
float getMicroVu () const;
bool isInConference () const;
bool getRecording () const;
bool mRecording = false;
QString mLastRecordFile;
};
#endif // CONFERENCE_MODEL_H_

View file

@ -132,3 +132,12 @@ std::shared_ptr<ParticipantDeviceListModel> ParticipantModel::getParticipantDevi
return mParticipantDevices;
}
void ParticipantModel::startInvitation(const int& secs){
QTimer::singleShot(secs * 1000, this, &ParticipantModel::onEndOfInvitation);
}
void ParticipantModel::onEndOfInvitation(){
if( getInviting())
emit invitationTimeout(this);
}

View file

@ -68,11 +68,13 @@ public:
//linphone::ChatRoomSecurityLevel getSecurityLevel() const;
//std::shared_ptr<linphone::ParticipantDevice> findDevice(const std::shared_ptr<const linphone::Address> & address) const;
void startInvitation(const int& secondes = 30); // Start a timer to remove the model if the invitation didn't ended after some time
public slots:
void onSecurityLevelChanged();
void onDeviceSecurityLevelChanged(std::shared_ptr<const linphone::Address> device);
void onEndOfInvitation();
signals:
void securityLevelChanged();
@ -83,6 +85,8 @@ signals:
void deviceCountChanged();
void invitingChanged();
void invitationTimeout(ParticipantModel* model);
// void contactUpdated ();

View file

@ -83,28 +83,29 @@ void ParticipantProxyModel::setChatRoomModel(ChatRoomModel * chatRoomModel){
}
}
void ParticipantProxyModel::add(const QString& address){
void ParticipantProxyModel::addAddress(const QString& address){
ParticipantListModel * participantsModel = dynamic_cast<ParticipantListModel*>(sourceModel());
if(!participantsModel->contains(address)){
std::shared_ptr<ParticipantModel> participant = std::make_shared<ParticipantModel>(nullptr);
participant->setSipAddress(address);
participantsModel->add(participant);
if(mChatRoomModel && mChatRoomModel->getChatRoom())// Invite and wait for its creation
if(mChatRoomModel && mChatRoomModel->getChatRoom()){// Invite and wait for its creation
mChatRoomModel->getChatRoom()->addParticipant(Utils::interpretUrl(address));
connect(participant.get(), &ParticipantModel::invitationTimeout, this, &ParticipantProxyModel::removeModel);
participant->startInvitation();
}
emit countChanged();
emit addressAdded(address);
}
}
void ParticipantProxyModel::remove(ParticipantModel * participant){
void ParticipantProxyModel::removeModel(ParticipantModel * participant){
if(participant) {
QString sipAddress = participant->getSipAddress();
if( !mChatRoomModel){
ParticipantListModel * participantsModel = dynamic_cast<ParticipantListModel*>(sourceModel());
participantsModel->remove(participant);
}else if(mChatRoomModel->getChatRoom() && participant->getParticipant() )
mChatRoomModel->getChatRoom()->removeParticipant(participant->getParticipant());
//dynamic_cast<ParticipantListModel*>(sourceModel())->remove(participant);
if(mChatRoomModel && mChatRoomModel->getChatRoom() && participant->getParticipant() )
mChatRoomModel->getChatRoom()->removeParticipant(participant->getParticipant()); // Remove already added
ParticipantListModel * participantsModel = dynamic_cast<ParticipantListModel*>(sourceModel());
participantsModel->remove(participant);
emit countChanged();
emit addressRemoved(sipAddress);
}

View file

@ -52,8 +52,8 @@ public:
void setChatRoomModel(ChatRoomModel * chatRoomModel);
Q_INVOKABLE void add(const QString& address);
Q_INVOKABLE void remove(ParticipantModel * participant);
Q_INVOKABLE void addAddress(const QString& address);
Q_INVOKABLE void removeModel(ParticipantModel * participant);

View file

@ -612,7 +612,10 @@ void SettingsModel::setChatEnabled (bool status) {
// -----------------------------------------------------------------------------
bool SettingsModel::getHideEmptyChatRooms() const{
return !!mConfig->getInt("misc", "hide_empty_chat_rooms", 0);
int defaultValue = 0;
if(!mConfig->hasEntry("misc", "hide_empty_chat_rooms"))// This step should be removed when this option comes from API and not directly from config file
mConfig->setInt("misc", "hide_empty_chat_rooms", defaultValue);
return !!mConfig->getInt("misc", "hide_empty_chat_rooms", defaultValue);
}
void SettingsModel::setHideEmptyChatRooms(const bool& status){

View file

@ -93,6 +93,10 @@ QString Utils::toDateString(QDateTime date){
return date.toString("yyyy/MM/dd");
}
QString Utils::getDisplayName(const QString& address){
return getDisplayName(interpretUrl(address));
}
QImage Utils::getImage(const QString &pUri) {
QImage image(pUri);
if(image.isNull()){// Try to determine format from headers instead of using suffix

View file

@ -56,6 +56,7 @@ public:
Q_INVOKABLE static QString toDateTimeString(QDateTime date);
Q_INVOKABLE static QString toTimeString(QDateTime date);
Q_INVOKABLE static QString toDateString(QDateTime date);
Q_INVOKABLE static QString getDisplayName(const QString& address);
//----------------------------------------------------------------------------------
static inline QString coreStringToAppString (const std::string &str) {

View file

@ -20,6 +20,7 @@ Rectangle {
)
height: parent.entryHeight
width: parent.entryWidth
property int implicitWidth : text.implicitWidth + DropDownStaticMenuStyle.entry.leftMargin + DropDownStaticMenuStyle.entry.rightMargin + 5 // 5 = Elide width
Text {
id: text

View file

@ -18,6 +18,16 @@ MouseArea {
property int hoveringCursor : Qt.PointingHandCursor
property bool isClickable : false
function show(){
if(isClickable){
if(tooltip.delay>0) {
tooltip.oldDelay = tooltip.delay
tooltip.delay = 0
}
tooltip.show(text, -1);
}
}
anchors.fill:parent
hoverEnabled: true
@ -34,13 +44,7 @@ MouseArea {
wheel.accepted = false
}
onClicked:{
if(isClickable){
if(tooltip.delay>0) {
tooltip.oldDelay = tooltip.delay
tooltip.delay = 0
}
tooltip.show(text, -1);
}
show()
mouse.accepted = false
}

View file

@ -117,12 +117,12 @@ function getParams (call) {
if (call.pausedByUser) {
optActions.push({
handler: (function () { call.pausedByUser = false }),
name: qsTr('resumeCall')
name: qsTr('resumeCall').toUpperCase()
})
} else if (Linphone.SettingsModel.callPauseEnabled) {
optActions.push({
handler: (function () { call.pausedByUser = true }),
name: qsTr('callPause')
name: qsTr('callPause').toUpperCase()
})
}
@ -130,25 +130,25 @@ function getParams (call) {
optActions.push({
handler: call.askForTransfer,
//: 'COMPLETE ATTENDED TRANSFER' : Title button, design is in uppercase.
name: qsTr('attendedTransferComplete')
name: qsTr('attendedTransferComplete').toUpperCase()
})
}
else {
optActions.push({
handler: call.askForTransfer,
name: qsTr('transferCall')
name: qsTr('transferCall').toUpperCase()
})
optActions.push({
handler: call.askForAttendedTransfer,
//: 'ATTENDED TRANSFER CALL' : Title button, design is in uppercase.
name: qsTr('attendedTransferCall')
name: qsTr('attendedTransferCall').toUpperCase()
})
}
return {
actions: optActions.concat([{
handler: call.terminate,
name: qsTr('terminateCall')
name: qsTr('terminateCall').toUpperCase()
}]),
component: callActions,
string: 'paused'

View file

@ -70,14 +70,15 @@ ListView {
relativeX: callControls.width
entryHeight: CallsStyle.entry.height
entryWidth: CallsStyle.entry.width
entryWidth: maxWidth
property int maxWidth : CallsStyle.entry.width
Repeater {
model: params ? params.actions : []
DropDownStaticMenuEntry {
entryName: modelData.name
Component.onCompleted: if( menu.maxWidth < implicitWidth ) menu.maxWidth = implicitWidth
onClicked: {
menu.close()
params.actions[index].handler()

View file

@ -86,17 +86,15 @@ Item {
// Handle hovered link.
MouseArea {
anchors.fill:parent
// height: parent.height
// width: rectangle.width
anchors.fill: parent
//height: messageMenu.height
//width: messageMenu.width
acceptedButtons: Qt.RightButton
propagateComposedEvents:true
cursorShape: parent.hoveredLink
? Qt.PointingHandCursor
: Qt.IBeamCursor
onClicked: mouse.button === Qt.RightButton && messageMenu.popup()
}
}

View file

@ -39,7 +39,12 @@ Row {
delay:0
text:parent.username+'\n'+ (isOutgoing ? $chatEntry.toSipAddress : $chatEntry.fromSipAddress)
tooltipParent:mainRow
isClickable: true
onDoubleClicked: {
window.mainSearchBar.text = $chatEntry.fromSipAddress
}
}
}
}
@ -74,6 +79,7 @@ Row {
//property ContentModel contentModel : ($chatEntry.getContent(0) ? $chatEntry.getContent(0) : null)
property ContentModel contentModel : $chatEntry.fileContentModel
property string thumbnail : contentModel ? contentModel.thumbnail : ''
color: isOutgoing
? ChatStyle.entry.message.outgoing.backgroundColor
: ChatStyle.entry.message.incoming.backgroundColor
@ -186,70 +192,83 @@ Row {
// ---------------------------------------------------------------------
// Upload or file status.
// ---------------------------------------------------------------------
Column {
Item{
Layout.fillWidth: true
Layout.fillHeight: true
spacing: ChatStyle.entry.message.file.status.spacing
Text {
id: fileName
Column {
anchors.fill: parent
color: isOutgoing
? ChatStyle.entry.message.outgoing.text.color
: ChatStyle.entry.message.incoming.text.color
elide: Text.ElideRight
spacing: ChatStyle.entry.message.file.status.spacing
font {
bold: true
pointSize: isOutgoing
? ChatStyle.entry.message.outgoing.text.pointSize
: ChatStyle.entry.message.incoming.text.pointSize
Text {
id: fileName
color: isOutgoing
? ChatStyle.entry.message.outgoing.text.color
: ChatStyle.entry.message.incoming.text.color
elide: Text.ElideRight
font {
bold: true
pointSize: isOutgoing
? ChatStyle.entry.message.outgoing.text.pointSize
: ChatStyle.entry.message.incoming.text.pointSize
}
text: (rectangle.contentModel ? rectangle.contentModel.name : '')
width: parent.width
}
text: (rectangle.contentModel ? rectangle.contentModel.name : '')
width: parent.width
}
ProgressBar {
id: progressBar
height: ChatStyle.entry.message.file.status.bar.height
width: parent.width
to: (rectangle.contentModel ? rectangle.contentModel.fileSize : 0)
value: rectangle.contentModel ? rectangle.contentModel.fileOffset || 0 : 0
visible: $chatEntry.state == LinphoneEnums.ChatMessageStateInProgress || $chatEntry.state == LinphoneEnums.ChatMessageStateFileTransferInProgress
background: Rectangle {
color: ChatStyle.entry.message.file.status.bar.background.color
radius: ChatStyle.entry.message.file.status.bar.radius
}
contentItem: Item {
Rectangle {
color: ChatStyle.entry.message.file.status.bar.contentItem.color
height: parent.height
width: progressBar.visualPosition * parent.width
ProgressBar {
id: progressBar
height: ChatStyle.entry.message.file.status.bar.height
width: parent.width
to: (rectangle.contentModel ? rectangle.contentModel.fileSize : 0)
value: rectangle.contentModel ? rectangle.contentModel.fileOffset || 0 : 0
visible: $chatEntry.state == LinphoneEnums.ChatMessageStateInProgress || $chatEntry.state == LinphoneEnums.ChatMessageStateFileTransferInProgress
background: Rectangle {
color: ChatStyle.entry.message.file.status.bar.background.color
radius: ChatStyle.entry.message.file.status.bar.radius
}
contentItem: Item {
Rectangle {
color: ChatStyle.entry.message.file.status.bar.contentItem.color
height: parent.height
width: progressBar.visualPosition * parent.width
radius: ChatStyle.entry.message.file.status.bar.radius
}
}
}
Text {
color: fileName.color
elide: Text.ElideRight
font.pointSize: fileName.font.pointSize
text: {
if(rectangle.contentModel){
var fileSize = Utils.formatSize(rectangle.contentModel.fileSize)
return progressBar.visible
? Utils.formatSize(rectangle.contentModel.fileOffset) + '/' + fileSize
: fileSize
}else
return ''
}
}
}
Text {
color: fileName.color
elide: Text.ElideRight
font.pointSize: fileName.font.pointSize
text: {
if(rectangle.contentModel){
var fileSize = Utils.formatSize(rectangle.contentModel.fileSize)
return progressBar.visible
? Utils.formatSize(rectangle.contentModel.fileOffset) + '/' + fileSize
: fileSize
}else
return ''
}
ChatMenu{
id: chatMenu
anchors.fill: parent
//height: parent.height
//width: parent.width
deliveryCount: deliveryLayout.model.count
onDeliveryStatusClicked: deliveryLayout.visible = !deliveryLayout.visible
onRemoveEntryRequested: removeEntry()
deliveryVisible: deliveryLayout.visible
}
}
}
@ -283,25 +302,18 @@ Row {
rectangle.contentModel.openFile()
} else if (rectangle.contentModel && rectangle.contentModel.wasDownloaded) {
rectangle.contentModel.openFile(true)// Show directory
thumbnailProvider.state = ''
} else {
rectangle.contentModel.downloadFile()
thumbnailProvider.state = ''
}
}
onExited: thumbnailProvider.state = ''
onMouseXChanged: handleMouseMove.call(this, mouse)
onMouseYChanged: handleMouseMove.call(this, mouse)
}
ChatMenu{
id: chatMenu
height: parent.height
width: rectangle.width
deliveryCount: deliveryLayout.model.count
onDeliveryStatusClicked: deliveryLayout.visible = !deliveryLayout.visible
onRemoveEntryRequested: removeEntry()
deliveryVisible: deliveryLayout.visible
}
Row{
id:ephemeralTimerRow
@ -326,7 +338,7 @@ Row {
icon:'timer'
iconSize: 15
}
}
}
}
ChatDeliveries{

View file

@ -30,7 +30,7 @@ Rectangle {
property string username: (entry != undefined ?(entry.contactModel != undefined ? entry.contactModel.vcard.username
:entry.username != undefined ?entry.username:
LinphoneUtils.getContactUsername(entry.sipAddress || entry.fullPeerAddress || entry.peerAddress || '')
UtilsCpp.getDisplayName(entry.sipAddress || entry.fullPeerAddress || entry.peerAddress || '')
):'')
// ---------------------------------------------------------------------------
@ -53,8 +53,9 @@ Rectangle {
Layout.preferredWidth: ContactStyle.contentHeight
//image: _contact && _contact.vcard.avatar
image: entry?(entry.contactModel?entry.contactModel.vcard.avatar:entry.avatar?entry.avatar: ''):''
image: entry?(entry.contactModel ? entry.contactModel.vcard.avatar
: entry.avatar ? entry.avatar : '')
:''
presenceLevel: entry?(entry.contactModel ? (entry.contactModel.presenceStatus >= 0 ? Presence.getPresenceLevel(entry.contactModel.presenceStatus) : -1)
: (entry.presenceStatus >= 0 ? Presence.getPresenceLevel(entry.presenceStatus) : -1)
)

View file

@ -7,6 +7,8 @@ import Linphone 1.0
import Linphone.Styles 1.0
import ColorsList 1.0
import UtilsCpp 1.0
import 'Timeline.js' as Logic
// =============================================================================
@ -222,6 +224,7 @@ Rectangle {
width: parent ? parent.width : 0
Contact {
id: contactView
property bool isSelected: modelData != undefined && modelData.selected //view.currentIndex === index
anchors.fill: parent
@ -240,16 +243,10 @@ Rectangle {
usernameColor: isSelected
? TimelineStyle.contact.username.color.selected
: TimelineStyle.contact.username.color.normal
Loader {
anchors.fill: parent
sourceComponent: TooltipArea {
//text: $timelineEntry.timestamp.toLocaleString(
//Qt.locale(App.locale),
//Locale.ShortFormat
//)
}
TooltipArea {
id: contactTooltip
text: UtilsCpp.toDateTimeString(modelData.chatRoomModel.lastUpdateTime)
isClickable: true
}
Icon{
icon: modelData.selected ? 'timer_light' : 'timer'
@ -264,12 +261,19 @@ Rectangle {
MouseArea {
anchors.fill: parent
acceptedButtons: Qt.LeftButton | Qt.RightButton
propagateComposedEvents: true
preventStealing: false
onClicked: {
//timeline.model.unselectAll()
if(modelData.selected)// Update selection
timeline.entrySelected(modelData)
modelData.selected = true
view.currentIndex = index;
if(mouse.button == Qt.LeftButton){
if(modelData.selected)// Update selection
timeline.entrySelected(modelData)
modelData.selected = true
view.currentIndex = index;
}else{
contactTooltip.show()
}
}
}

View file

@ -76,12 +76,13 @@ Rectangle {
id: rightActions
anchors.right: parent.right
iconSize: CallStyle.header.iconSize
iconSize: CallStyle.header.buttonIconSize
ActionSwitch {
enabled: conference.conferenceModel.recording
icon: 'record'
useStates: false
visible: SettingsModel.callRecorderEnabled
onClicked: !enabled
? conference.conferenceModel.startRecording()

View file

@ -35,7 +35,7 @@ Avatar {
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
text: '&#9616;&nbsp;&#9612;'
text: '&#10073;&#10073;'
textFormat: Text.RichText
visible: call.status === CallModel.CallStatusPaused
}

View file

@ -40,6 +40,18 @@ ColumnLayout {
property bool haveMoreThanOneParticipants: chatRoomModel ? chatRoomModel.participants.count > 2 : false
property bool haveLessThanMinParticipantsForCall: chatRoomModel ? chatRoomModel.participants.count <= 5 : false
function getPeerAddress() {
if(chatRoomModel) {
if(chatRoomModel.groupEnabled || chatRoomModel.isSecure()) {
return chatRoomModel.participants.addressesToString;
}else {
return chatRoomModel.sipAddress;
}
}else {
return conversation.fullPeerAddress || conversation.peerAddress || '';
}
}
// ---------------------------------------------------------------------------
spacing: 0
@ -279,7 +291,7 @@ ColumnLayout {
visible: SettingsModel.contactsEnabled && !conversation.chatRoomModel.groupEnabled
onClicked: window.setView('ContactEdit', {
sipAddress: conversation.peerAddress
sipAddress: conversation.getPeerAddress()
})
TooltipArea {
text: Logic.getEditTooltipText()

View file

@ -93,12 +93,12 @@ DialogPlus {
return !chatRoomModel.haveEncryption || UtilsCpp.hasCapability(entry.sipAddress, LinphoneEnums.FriendCapabilityLimeX3Dh);
},
handler: function (entry) {
selectedParticipants.add(entry.sipAddress)
selectedParticipants.addAddress(entry.sipAddress)
},
}]
onEntryClicked: {
selectedParticipants.add(entry)
selectedParticipants.addAddress(entry)
}
}
@ -159,7 +159,7 @@ DialogPlus {
visible:true,
tooltipText: 'Remove this participant from the selection',
handler: function (entry) {
selectedParticipants.remove(entry)
selectedParticipants.removeModel(entry)
// ++lastContacts.reloadCount
}
}]

View file

@ -256,7 +256,7 @@ DialogPlus {
anchors.fill:parent
visible:!mask.visible
onClicked: {
selectedParticipants.add(modelData.sipAddress)
selectedParticipants.addAddress(modelData.sipAddress)
smartSearchBar.addAddressToIgnore(modelData.sipAddress);
++lastContacts.reloadCount
}
@ -317,7 +317,7 @@ DialogPlus {
return isUsable(entry.sipAddress)
},
handler: function (entry) {
selectedParticipants.add(entry.sipAddress)
selectedParticipants.addAddress(entry.sipAddress)
smartSearchBar.addAddressToIgnore(entry.sipAddress);
++lastContacts.reloadCount
},
@ -325,7 +325,7 @@ DialogPlus {
onEntryClicked: {
if( isUsable(entry)){
selectedParticipants.add(entry)
selectedParticipants.addAddress(entry)
smartSearchBar.addAddressToIgnore(entry);
++lastContacts.reloadCount
}
@ -364,7 +364,7 @@ DialogPlus {
showInvitingIndicator: false
function removeParticipant(entry){
smartSearchBar.removeAddressToIgnore(entry.sipAddress)
selectedParticipants.remove(entry)
selectedParticipants.removeModel(entry)
++lastContacts.reloadCount
}

View file

@ -46,7 +46,7 @@ QtObject {
property QtObject text: QtObject {
property color color: ColorsList.add("Call_container_pause_text", "q").color
property int pointSizeFactor: 10
property int pointSizeFactor: 5
}
}
}