diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index c1592ec0b..b10c489bd 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -555,6 +555,16 @@ Server url ikke konfigureret. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index 70311c548..f1c1400dc 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -555,6 +555,16 @@ Server URL ist nicht konfiguriert. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index f872bbf16..7eb7dc06e 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -555,6 +555,16 @@ Server URL not configured. %1 participants + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + Meeting has been cancelled + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + Meeting has been updated + ChatDeliveries diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 35dccc2e8..0e94ea46e 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -555,6 +555,16 @@ URL del servidor no configurada. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index c5b3ade61..ab93e92da 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -555,6 +555,16 @@ URL du serveur non configurée. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 64a85a952..c4a0794d8 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -553,6 +553,16 @@ A kiszolgáló URL-je nincs konfigurálva. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index 621b894e7..6376e23bf 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -555,6 +555,16 @@ URL del server non configurato. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index c1e7a275a..37b8b6376 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -553,6 +553,16 @@ + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index 038a739db..2b9ffde74 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -557,6 +557,16 @@ Nesukonfigūruotas serverio url. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index ee3949804..d8c2c5960 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -555,6 +555,16 @@ URL do servidor não configurado. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index ffaa66287..fdc3c0814 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -557,6 +557,16 @@ + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index 698794c15..eb3adad86 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -555,6 +555,16 @@ Serverwebbadressen är inte konfigurerad. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index 302b3a452..8e20ea1a9 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -553,6 +553,16 @@ Sunucu url'si yapılandırılmadı. + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index f0407b205..ba521fe7a 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -557,6 +557,16 @@ + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index 51a5c29b4..2f2ac04e5 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -553,6 +553,16 @@ + + icsUpdatedMeetingInvite + 'Meeting has been cancelled' : ICS title for a cancelled invitation. + + + + icsCancelledMeetingInvite + 'Meeting has been updated' : ICS title for an updated invitation. + + ChatDeliveries diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp index bcbdbcd32..5bc97e993 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoListModel.cpp @@ -97,8 +97,9 @@ QSharedPointer ConferenceInfoListModel::get(std::shared_ptr auto model = item.objectCast(); auto dbConferenceInfo = model->getConferenceInfo(); if(dbConferenceInfo == conferenceInfo - || dbConferenceInfo->getUri()->weakEqual(uri)) + || dbConferenceInfo->getUri()->equal(uri)){ return model; + } } return nullptr; } diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp index 7c7b6fde0..710f6afc3 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp @@ -103,6 +103,7 @@ ConferenceInfoModel::ConferenceInfoModel (QObject * parent) : QObject(parent){ connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::uriChanged);// Useless but just in case. connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::isScheduledChanged); connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::inviteModeChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::conferenceInfoStateChanged); } // Callable from C++ @@ -111,6 +112,18 @@ ConferenceInfoModel::ConferenceInfoModel (std::shared_ptrgetDateTime() != 0 || mConferenceInfo->getDuration() != 0); + + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::timeZoneModelChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::dateTimeChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::durationChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::organizerChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::subjectChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::descriptionChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::participantsChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::uriChanged);// Useless but just in case. + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::isScheduledChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::inviteModeChanged); + connect(this, &ConferenceInfoModel::conferenceInfoChanged, this, &ConferenceInfoModel::conferenceInfoStateChanged); } ConferenceInfoModel::~ConferenceInfoModel () { @@ -206,6 +219,10 @@ QString ConferenceInfoModel::getIcalendarString() const{ return Utils::coreStringToAppString(mConferenceInfo->getIcalendarString()); } +LinphoneEnums::ConferenceInfoState ConferenceInfoModel::getConferenceInfoState() const{ + return LinphoneEnums::fromLinphone(mConferenceInfo->getState()); +} + //------------------------------------------------------------------------------------------------ // Convert into UTC with TimeZone and pass system timezone to conference info void ConferenceInfoModel::setDateTime(const QDateTime& dateTime){ diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp index 916087983..3e5adfaee 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.hpp @@ -27,6 +27,8 @@ #include #include +#include "utils/LinphoneEnums.hpp" + class ParticipantListModel; class ConferenceScheduler; class TimeZoneModel; @@ -47,6 +49,7 @@ public: Q_PROPERTY(QString uri READ getUri NOTIFY uriChanged) Q_PROPERTY(bool isScheduled READ isScheduled WRITE setIsScheduled NOTIFY isScheduledChanged) Q_PROPERTY(int inviteMode READ getInviteMode WRITE setInviteMode NOTIFY inviteModeChanged) + Q_PROPERTY(LinphoneEnums::ConferenceInfoState state READ getConferenceInfoState NOTIFY conferenceInfoStateChanged) static QSharedPointer create(std::shared_ptr conferenceInfo); ConferenceInfoModel (QObject * parent = nullptr); @@ -72,6 +75,7 @@ public: Q_INVOKABLE int getParticipantCount()const; Q_INVOKABLE TimeZoneModel* getTimeZoneModel() const; Q_INVOKABLE QString getIcalendarString() const; + LinphoneEnums::ConferenceInfoState getConferenceInfoState() const; void setDateTime(const QDateTime& dateTime); void setDuration(const int& duration); @@ -106,6 +110,7 @@ signals: void uriChanged(); void isScheduledChanged(); void inviteModeChanged(); + void conferenceInfoStateChanged(); void conferenceCreated(); void conferenceCreationFailed(); diff --git a/linphone-app/src/components/other/colors/ColorListModel.hpp b/linphone-app/src/components/other/colors/ColorListModel.hpp index ab983d820..92e764ac5 100644 --- a/linphone-app/src/components/other/colors/ColorListModel.hpp +++ b/linphone-app/src/components/other/colors/ColorListModel.hpp @@ -147,6 +147,9 @@ class ColorListModel : public ProxyListModel { ADD_COLOR("incall_message_banner_bg", "#FC4607", "Incall message banner background") ADD_COLOR("incall_message_banner_fg", "#FFFFFF", "Incall message banner foreground") + ADD_COLOR_WITH_LINK("ics_fg", "", "Special text color for ICS", "j") + ADD_COLOR("updated_ics_fg", "#EFAE00", "Special text color for updated ICS") + ADD_COLOR("cancelled_ics_fg", "#FF0000", "Special text color for cancelled ICS") // Keywords: 'mKeywordsMap' // s=standard, ma=main, l=list, sc=screen, me=menu diff --git a/linphone-app/src/utils/LinphoneEnums.cpp b/linphone-app/src/utils/LinphoneEnums.cpp index d3e26513d..98731de8a 100644 --- a/linphone-app/src/utils/LinphoneEnums.cpp +++ b/linphone-app/src/utils/LinphoneEnums.cpp @@ -78,6 +78,14 @@ LinphoneEnums::ConferenceLayout LinphoneEnums::fromLinphone(const linphone::Conf return static_cast(layout); } +linphone::ConferenceInfoState LinphoneEnums::toLinphone(const LinphoneEnums::ConferenceInfoState& state){ + return static_cast(state); +} + +LinphoneEnums::ConferenceInfoState LinphoneEnums::fromLinphone(const linphone::ConferenceInfoState& state){ + return static_cast(state); +} + linphone::ParticipantDeviceState LinphoneEnums::toLinphone(const LinphoneEnums::ParticipantDeviceState& state){ return static_cast(state); } diff --git a/linphone-app/src/utils/LinphoneEnums.hpp b/linphone-app/src/utils/LinphoneEnums.hpp index bbc354a3a..97de1d92c 100644 --- a/linphone-app/src/utils/LinphoneEnums.hpp +++ b/linphone-app/src/utils/LinphoneEnums.hpp @@ -121,6 +121,18 @@ Q_ENUM_NS(ConferenceLayout) linphone::ConferenceLayout toLinphone(const LinphoneEnums::ConferenceLayout& layout); LinphoneEnums::ConferenceLayout fromLinphone(const linphone::ConferenceLayout& layout); + +enum ConferenceInfoState { + ConferenceInfoStateNew = int(linphone::ConferenceInfoState::New), + ConferenceInfoStateUpdated = int(linphone::ConferenceInfoState::Updated), + ConferenceInfoStateCancelled = int(linphone::ConferenceInfoState::Cancelled) +}; +Q_ENUM_NS(ConferenceInfoState) + +linphone::ConferenceInfoState toLinphone(const LinphoneEnums::ConferenceInfoState& state); +LinphoneEnums::ConferenceInfoState fromLinphone(const linphone::ConferenceInfoState& state); + + enum ParticipantDeviceState { ParticipantDeviceStateJoining = int(linphone::ParticipantDeviceState::Joining), ParticipantDeviceStatePresent = int(linphone::ParticipantDeviceState::Present), diff --git a/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml b/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml index 967c63bd3..27a9669ac 100644 --- a/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml +++ b/linphone-app/ui/modules/Linphone/Chat/ChatConferenceInvitationMessage.qml @@ -68,20 +68,33 @@ Loader{ onMinHeightChanged: Qt.callLater( layout.updateFitHeight) property int fitHeight: 0 - property int fitWidth: Math.max(shareButton.width + joinButton.width, description.fitWidth) + property int fitWidth: Math.max(titleItem.implicitWidth, Math.max(shareButton.width + joinButton.width, description.fitWidth)) anchors.fill: parent spacing: 0 Text{ + id: titleItem Layout.fillWidth: true Layout.topMargin: 5 Layout.leftMargin: 5 Layout.alignment: Qt.AlignRight elide: Text.ElideRight - color: ChatCalendarMessageStyle.type.color + color: mainItem.conferenceInfoModel.state == LinphoneEnums.ConferenceInfoStateUpdated + ? ChatCalendarMessageStyle.type.updatedColor + : mainItem.conferenceInfoModel.state == LinphoneEnums.ConferenceInfoStateCancelled + ? ChatCalendarMessageStyle.type.cancelledColor + : ChatCalendarMessageStyle.type.color + font.pointSize: ChatCalendarMessageStyle.type.pointSize font.weight: Font.Bold + text: (mainItem.conferenceInfoModel.state == LinphoneEnums.ConferenceInfoStateUpdated + //: 'Meeting has been cancelled' : ICS title for a cancelled invitation. + ? qsTr('icsUpdatedMeetingInvite') + : mainItem.conferenceInfoModel.state == LinphoneEnums.ConferenceInfoStateCancelled + //: 'Meeting has been updated' : ICS title for an updated invitation. + ? qsTr('icsCancelledMeetingInvite') //: 'Meeting invite' : ICS title that is an invitation. - text: qsTr('icsMeetingInvite') +': '// + UtilsCpp.getDisplayName(mainItem.conferenceInfoModel.organizer) + : qsTr('icsMeetingInvite') + ) +': '// + UtilsCpp.getDisplayName(mainItem.conferenceInfoModel.organizer) } Text{ id: title diff --git a/linphone-app/ui/modules/Linphone/Styles/Chat/ChatCalendarMessageStyle.qml b/linphone-app/ui/modules/Linphone/Styles/Chat/ChatCalendarMessageStyle.qml index 370ad24dc..2dda1513d 100644 --- a/linphone-app/ui/modules/Linphone/Styles/Chat/ChatCalendarMessageStyle.qml +++ b/linphone-app/ui/modules/Linphone/Styles/Chat/ChatCalendarMessageStyle.qml @@ -56,7 +56,9 @@ QtObject { property QtObject type: QtObject { property int spacing: 5 property int pointSize: Units.dp * 10 - property color color: ColorsList.add(sectionName+'_subject', 'j').color + property color updatedColor: ColorsList.add(sectionName+'_updated_subject', 'updated_ics_fg').color + property color cancelledColor: ColorsList.add(sectionName+'_cancelled_subject', 'cancelled_ics_fg').color + property color color: ColorsList.add(sectionName+'_subject', 'ics_fg').color } property QtObject subject: QtObject { property int spacing: 5