From c14607ad226b1c9de204d43ef7c4ce9baaef3f82 Mon Sep 17 00:00:00 2001 From: Julien Wadel Date: Wed, 13 Jul 2022 17:56:46 +0200 Subject: [PATCH] Disable group chat and conference buttons if URIs are not set. Add a tooltip on buttons to warn the user about it. Allow empty conference URI in settings. --- CHANGELOG.md | 1 + linphone-app/assets/languages/da.ts | 10 +++++++ linphone-app/assets/languages/de.ts | 10 +++++++ linphone-app/assets/languages/en.ts | 12 ++++++++- linphone-app/assets/languages/es.ts | 10 +++++++ linphone-app/assets/languages/fr_FR.ts | 10 +++++++ linphone-app/assets/languages/hu.ts | 10 +++++++ linphone-app/assets/languages/it.ts | 10 +++++++ linphone-app/assets/languages/ja.ts | 10 +++++++ linphone-app/assets/languages/lt.ts | 10 +++++++ linphone-app/assets/languages/pt_BR.ts | 10 +++++++ linphone-app/assets/languages/ru.ts | 10 +++++++ linphone-app/assets/languages/sv.ts | 10 +++++++ linphone-app/assets/languages/tr.ts | 10 +++++++ linphone-app/assets/languages/uk.ts | 10 +++++++ linphone-app/assets/languages/zh_CN.ts | 10 +++++++ .../conferenceInfo/ConferenceInfoModel.cpp | 6 +++-- .../settings/AccountSettingsModel.cpp | 8 +++--- .../src/components/settings/SettingsModel.cpp | 27 ++++++++++++++++--- .../src/components/settings/SettingsModel.hpp | 11 ++++++-- .../ui/views/App/Calls/CallsWindow.qml | 2 +- .../ui/views/App/Main/Conversation.qml | 25 ++++++++++++++--- .../ui/views/App/Main/Dialogs/NewChatRoom.qml | 1 + linphone-app/ui/views/App/Main/MainWindow.qml | 20 ++++++++++++-- .../App/Styles/Calls/VideoConferenceStyle.qml | 2 +- .../App/Styles/Main/ConversationStyle.qml | 2 ++ .../views/App/Styles/Main/MainWindowStyle.qml | 4 +++ linphone-sdk | 2 +- 28 files changed, 242 insertions(+), 21 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 71889d8e4..a820c4cae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Phone dialpad on main window. - Animated file in chats/notifications. - Round progress bar for transferring a file and allow to cancel it. +- hide all accounts if their custom parameter 'hidden' is set to 1. ### Fixed - Crash on exit. diff --git a/linphone-app/assets/languages/da.ts b/linphone-app/assets/languages/da.ts index f3fa295d6..c8b558500 100644 --- a/linphone-app/assets/languages/da.ts +++ b/linphone-app/assets/languages/da.ts @@ -1506,6 +1506,16 @@ Klik her: <a href="%1">%1</a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/de.ts b/linphone-app/assets/languages/de.ts index 49ba06045..73c737728 100644 --- a/linphone-app/assets/languages/de.ts +++ b/linphone-app/assets/languages/de.ts @@ -1506,6 +1506,16 @@ Klicken Sie hier: <a href="%1">%1</a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/en.ts b/linphone-app/assets/languages/en.ts index 1ff07611f..63585a90f 100644 --- a/linphone-app/assets/languages/en.ts +++ b/linphone-app/assets/languages/en.ts @@ -1506,6 +1506,16 @@ Click here: <a href="%1">%1</a> 'Conferences' : Conference title for main window. Meetings + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + Conference URI is not set. You have to change it in your account settings in order to create new group chats. + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + Video conference URI is not set. You have to change it in your account settings in order to create new conferences. + MainWindowMenuBar @@ -3454,7 +3464,7 @@ Click here: <a href="%1">%1</a> callWarningRecord 'This call is being recorded.' : Warn the user that the remote is currently recording the call. - This call is being recorded. + This call is being recorded. diff --git a/linphone-app/assets/languages/es.ts b/linphone-app/assets/languages/es.ts index 094c8e46e..96c499358 100644 --- a/linphone-app/assets/languages/es.ts +++ b/linphone-app/assets/languages/es.ts @@ -1506,6 +1506,16 @@ Haga clic aquí: <a href="%1">%1 </a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/fr_FR.ts b/linphone-app/assets/languages/fr_FR.ts index 2112df795..aa4e9132d 100644 --- a/linphone-app/assets/languages/fr_FR.ts +++ b/linphone-app/assets/languages/fr_FR.ts @@ -1506,6 +1506,16 @@ Cliquez ici : <a href="%1">%1</a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/hu.ts b/linphone-app/assets/languages/hu.ts index 9430f6ce4..611f88f30 100644 --- a/linphone-app/assets/languages/hu.ts +++ b/linphone-app/assets/languages/hu.ts @@ -1496,6 +1496,16 @@ Kattintson ide: <a href="%1">%1</a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/it.ts b/linphone-app/assets/languages/it.ts index f0bdb4d8a..1e1577e25 100644 --- a/linphone-app/assets/languages/it.ts +++ b/linphone-app/assets/languages/it.ts @@ -1506,6 +1506,16 @@ Clicca: <a href="%1">%1</a> 'Conferences' : Conference title for main window. Conferenze + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/ja.ts b/linphone-app/assets/languages/ja.ts index 182554278..c34f88dc5 100644 --- a/linphone-app/assets/languages/ja.ts +++ b/linphone-app/assets/languages/ja.ts @@ -1496,6 +1496,16 @@ 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/lt.ts b/linphone-app/assets/languages/lt.ts index 67f017010..c9e6b6737 100644 --- a/linphone-app/assets/languages/lt.ts +++ b/linphone-app/assets/languages/lt.ts @@ -1516,6 +1516,16 @@ Spustelėkite čia: <a href="%1">%1</a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/pt_BR.ts b/linphone-app/assets/languages/pt_BR.ts index c8aa25f20..09bd9e6e0 100644 --- a/linphone-app/assets/languages/pt_BR.ts +++ b/linphone-app/assets/languages/pt_BR.ts @@ -1506,6 +1506,16 @@ Clique aqui: <a href="%1">%1 </a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/ru.ts b/linphone-app/assets/languages/ru.ts index bf5b3900c..ab2e3deeb 100644 --- a/linphone-app/assets/languages/ru.ts +++ b/linphone-app/assets/languages/ru.ts @@ -1516,6 +1516,16 @@ 'Conferences' : Conference title for main window. Конференции + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/sv.ts b/linphone-app/assets/languages/sv.ts index 59fa0939d..9aed2b129 100644 --- a/linphone-app/assets/languages/sv.ts +++ b/linphone-app/assets/languages/sv.ts @@ -1506,6 +1506,16 @@ Klicka här: <a href="%1">%1</a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/tr.ts b/linphone-app/assets/languages/tr.ts index e7b1cea24..16228920c 100644 --- a/linphone-app/assets/languages/tr.ts +++ b/linphone-app/assets/languages/tr.ts @@ -1496,6 +1496,16 @@ Buraya tıklayın: <a href="%1">%1</a> 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/uk.ts b/linphone-app/assets/languages/uk.ts index 703a87195..1069bfeb4 100644 --- a/linphone-app/assets/languages/uk.ts +++ b/linphone-app/assets/languages/uk.ts @@ -1516,6 +1516,16 @@ 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/assets/languages/zh_CN.ts b/linphone-app/assets/languages/zh_CN.ts index 005eec84c..8efd486f0 100644 --- a/linphone-app/assets/languages/zh_CN.ts +++ b/linphone-app/assets/languages/zh_CN.ts @@ -1496,6 +1496,16 @@ 'Conferences' : Conference title for main window. + + newChatRoomUriMissing + 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + + + + newConferenceUriMissing + 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + + MainWindowMenuBar diff --git a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp index 734a2f44c..14fc3c194 100644 --- a/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp +++ b/linphone-app/src/components/conferenceInfo/ConferenceInfoModel.cpp @@ -88,8 +88,10 @@ ConferenceInfoModel::ConferenceInfoModel (QObject * parent) : QObject(parent){ mConferenceInfo->setDuration(0); mIsScheduled = false; auto accountAddress = CoreManager::getInstance()->getCore()->getDefaultAccount()->getContactAddress(); - accountAddress->clean(); - mConferenceInfo->setOrganizer(accountAddress); + if(accountAddress){ + accountAddress->clean(); + mConferenceInfo->setOrganizer(accountAddress); + } } // Callable from C++ diff --git a/linphone-app/src/components/settings/AccountSettingsModel.cpp b/linphone-app/src/components/settings/AccountSettingsModel.cpp index 7bda77930..ead72bd65 100644 --- a/linphone-app/src/components/settings/AccountSettingsModel.cpp +++ b/linphone-app/src/components/settings/AccountSettingsModel.cpp @@ -316,12 +316,10 @@ bool AccountSettingsModel::addOrUpdateAccount( routes.push_back(Utils::interpretUrl(data["route"].toString())); accountParams->setRoutesAddresses(routes); } - QString txt = data["conferenceUri"].toString(); - if(!txt.isEmpty()) - accountParams->setConferenceFactoryUri(Utils::appStringToCoreString(txt)); + QString txt = data["conferenceUri"].toString();// Var is used for debug + accountParams->setConferenceFactoryUri(Utils::appStringToCoreString(txt)); txt = data["videoConferenceUri"].toString(); - if(!txt.isEmpty()) - accountParams->setAudioVideoConferenceFactoryAddress(Utils::interpretUrl(txt)); + accountParams->setAudioVideoConferenceFactoryAddress(Utils::interpretUrl(txt)); if(data.contains("contactParams")) accountParams->setContactParameters(Utils::appStringToCoreString(data["contactParams"].toString())); diff --git a/linphone-app/src/components/settings/SettingsModel.cpp b/linphone-app/src/components/settings/SettingsModel.cpp index ad9bd7304..b7ad19438 100644 --- a/linphone-app/src/components/settings/SettingsModel.cpp +++ b/linphone-app/src/components/settings/SettingsModel.cpp @@ -31,12 +31,14 @@ #include "app/App.hpp" #include "app/logger/Logger.hpp" #include "app/paths/Paths.hpp" + #include "components/core/CoreManager.hpp" #include "components/tunnel/TunnelModel.hpp" #include "include/LinphoneApp/PluginNetworkHelper.hpp" #include "utils/Utils.hpp" #include "utils/Constants.hpp" #include "utils/MediastreamerUtils.hpp" +#include "AccountSettingsModel.hpp" #include "SettingsModel.hpp" @@ -57,7 +59,17 @@ SettingsModel::SettingsModel (QObject *parent) : QObject(parent) { this, &SettingsModel::handleCallStateChanged); QObject::connect(coreManager->getHandlers().get(), &CoreHandlers::ecCalibrationResult, this, &SettingsModel::handleEcCalibrationResult); - + +// Readonly state that can change from default account + connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::defaultAccountChanged, this, &SettingsModel::groupChatEnabledChanged); + connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::defaultAccountChanged, this, &SettingsModel::videoConferenceEnabledChanged); + connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::defaultAccountChanged, this, &SettingsModel::secureChatEnabledChanged); + + connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::accountSettingsUpdated, this, &SettingsModel::groupChatEnabledChanged); + connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::accountSettingsUpdated, this, &SettingsModel::videoConferenceEnabledChanged); + connect(coreManager->getAccountSettingsModel(), &AccountSettingsModel::accountSettingsUpdated, this, &SettingsModel::secureChatEnabledChanged); + + configureRlsUri(); } @@ -808,13 +820,19 @@ void SettingsModel::setStandardChatEnabled (bool status) { } bool SettingsModel::getSecureChatEnabled () const { - return !!mConfig->getInt(UiSection, getEntryFullName(UiSection, "secure_chat_enabled"), 1); + return !!mConfig->getInt(UiSection, getEntryFullName(UiSection, "secure_chat_enabled"), 1) + && !CoreManager::getInstance()->getCore()->getLimeX3DhServerUrl().empty() && getGroupChatEnabled(); + ; } void SettingsModel::setSecureChatEnabled (bool status) { if(!isReadOnly(UiSection, "secure_chat_enabled")) mConfig->setInt(UiSection, "secure_chat_enabled", status); - emit secureChatEnabledChanged(getSecureChatEnabled () ); + emit secureChatEnabledChanged(); +} + +bool SettingsModel::getGroupChatEnabled() const{ + return !CoreManager::getInstance()->getCore()->getDefaultAccount()->getParams()->getConferenceFactoryUri().empty(); } // ----------------------------------------------------------------------------- @@ -853,6 +871,9 @@ void SettingsModel::setConferenceEnabled (bool status) { emit conferenceEnabledChanged(status); } +bool SettingsModel::getVideoConferenceEnabled() const{ + return !!CoreManager::getInstance()->getCore()->getDefaultAccount()->getParams()->getAudioVideoConferenceFactoryAddress(); +} // ----------------------------------------------------------------------------- bool SettingsModel::getChatNotificationsEnabled () const { diff --git a/linphone-app/src/components/settings/SettingsModel.hpp b/linphone-app/src/components/settings/SettingsModel.hpp index 4e5a17e2a..8f5d42709 100644 --- a/linphone-app/src/components/settings/SettingsModel.hpp +++ b/linphone-app/src/components/settings/SettingsModel.hpp @@ -123,12 +123,14 @@ class SettingsModel : public QObject { Q_PROPERTY(bool standardChatEnabled READ getStandardChatEnabled WRITE setStandardChatEnabled NOTIFY standardChatEnabledChanged) Q_PROPERTY(bool secureChatEnabled READ getSecureChatEnabled WRITE setSecureChatEnabled NOTIFY secureChatEnabledChanged) + Q_PROPERTY(bool groupChatEnabled READ getGroupChatEnabled NOTIFY groupChatEnabledChanged) 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 videoConferenceEnabled READ getVideoConferenceEnabled NOTIFY videoConferenceEnabledChanged) Q_PROPERTY(bool chatNotificationsEnabled READ getChatNotificationsEnabled WRITE setChatNotificationsEnabled NOTIFY chatNotificationsEnabledChanged) Q_PROPERTY(bool chatNotificationSoundEnabled READ getChatNotificationSoundEnabled WRITE setChatNotificationSoundEnabled NOTIFY chatNotificationSoundEnabledChanged) @@ -427,8 +429,11 @@ public: bool getWaitRegistrationForCall() const; void setWaitRegistrationForCall(const bool& data); + bool getGroupChatEnabled()const; + bool getConferenceEnabled () const; void setConferenceEnabled (bool status); + bool getVideoConferenceEnabled()const; bool getChatNotificationsEnabled () const; void setChatNotificationsEnabled (bool status); @@ -698,11 +703,13 @@ signals: void muteMicrophoneEnabledChanged (bool status); void standardChatEnabledChanged (bool status); - void secureChatEnabledChanged (bool status); + void secureChatEnabledChanged (); + void groupChatEnabledChanged(); void hideEmptyChatRoomsChanged (bool status); void waitRegistrationForCallChanged (bool status); void conferenceEnabledChanged (bool status); + void videoConferenceEnabledChanged (); void chatNotificationsEnabledChanged (bool status); void chatNotificationSoundEnabledChanged (bool status); diff --git a/linphone-app/ui/views/App/Calls/CallsWindow.qml b/linphone-app/ui/views/App/Calls/CallsWindow.qml index 74b7af706..1815020bf 100644 --- a/linphone-app/ui/views/App/Calls/CallsWindow.qml +++ b/linphone-app/ui/views/App/Calls/CallsWindow.qml @@ -225,7 +225,7 @@ Window { Connections { target: SettingsModel onStandardChatEnabledChanged: if(!chatRoomModel.haveEncryption) proxyModel.setEntryTypeFilter(status ? ChatRoomModel.GenericEntry : ChatRoomModel.CallEntry | ChatRoomModel.NoticeEntry) - onSecureChatEnabledChanged: if(chatRoomModel.haveEncryption) proxyModel.setEntryTypeFilter(status ? ChatRoomModel.GenericEntry : ChatRoomModel.CallEntry | ChatRoomModel.NoticeEntry) + onSecureChatEnabledChanged: if(chatRoomModel.haveEncryption) proxyModel.setEntryTypeFilter(SettingsModel.secureChatEnabled ? ChatRoomModel.GenericEntry : ChatRoomModel.CallEntry | ChatRoomModel.NoticeEntry) } } } diff --git a/linphone-app/ui/views/App/Main/Conversation.qml b/linphone-app/ui/views/App/Main/Conversation.qml index 5342b9978..fbd18327f 100644 --- a/linphone-app/ui/views/App/Main/Conversation.qml +++ b/linphone-app/ui/views/App/Main/Conversation.qml @@ -268,7 +268,6 @@ ColumnLayout { onClicked: CallsListModel.launchVideoCall(chatRoomModel.participants.addressesToString) } - ActionButton { isCustom: true backgroundRadius: 1000 @@ -303,13 +302,33 @@ ColumnLayout { } ActionButton { + id: groupCallButton + property ConferenceInfoModel conferenceInfoModel: ConferenceInfoModel{} + Connections{ + target: groupCallButton.conferenceInfoModel + onConferenceCreated: { + groupCallButton.toggled = false + } + onConferenceCreationFailed:{ + groupCallButton.toggled = false + } + } isCustom: true backgroundRadius: 1000 colorSet: ConversationStyle.bar.actions.groupChat - visible: SettingsModel.outgoingCallsEnabled && conversation.haveMoreThanOneParticipants && conversation.haveLessThanMinParticipantsForCall && !conversation.isReadOnly + visible: SettingsModel.videoConferenceEnabled && SettingsModel.outgoingCallsEnabled && conversation.haveMoreThanOneParticipants && conversation.haveLessThanMinParticipantsForCall && !conversation.isReadOnly - onClicked: Logic.openConferenceManager({chatRoomModel:conversation.chatRoomModel, autoCall:true}) + //onClicked: CallsListModel. Logic.openConferenceManager({chatRoomModel:conversation.chatRoomModel, autoCall:true}) + onClicked:{ + groupCallButton.toggled = true + conferenceInfoModel.isScheduled = false + conferenceInfoModel.subject = chatRoomModel.subject + + conferenceInfoModel.setParticipants(conversation.chatRoomModel.participants) + conferenceInfoModel.inviteMode = 0; + conferenceInfoModel.createConference(false)// TODO activate it when secure video conference is implemented + } //: "Call all chat room's participants" : tooltip on a button for calling all participant in the current chat room tooltipText: qsTr("groupChatCallButton") } diff --git a/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml b/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml index 060f46241..f4de9f1b2 100644 --- a/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml +++ b/linphone-app/ui/views/App/Main/Dialogs/NewChatRoom.qml @@ -90,6 +90,7 @@ DialogPlus { Layout.fillWidth: true Layout.topMargin:15 spacing:4 + visible: SettingsModel.secureChatEnabled Text { Layout.fillWidth: true //: 'Would you like to encrypt your chat?' : Ask about setting the chat room as secured. diff --git a/linphone-app/ui/views/App/Main/MainWindow.qml b/linphone-app/ui/views/App/Main/MainWindow.qml index 7e909af7d..3c38fe81e 100644 --- a/linphone-app/ui/views/App/Main/MainWindow.qml +++ b/linphone-app/ui/views/App/Main/MainWindow.qml @@ -215,12 +215,20 @@ ApplicationWindow { //: 'Start a chat room' : Tooltip to illustrate a button tooltipText : qsTr('newChatRoom') - visible: SettingsModel.standardChatEnabled || SettingsModel.secureChatEnabled + visible: (SettingsModel.standardChatEnabled || SettingsModel.secureChatEnabled) + enabled: SettingsModel.groupChatEnabled onClicked: { window.detachVirtualWindow() window.attachVirtualWindow(Qt.resolvedUrl('Dialogs/NewChatRoom.qml') ,{}) } + TooltipArea{ + visible: !SettingsModel.groupChatEnabled + maxWidth: smartSearchBar.width + delay:0 + //: 'Conference URI is not set. You have to change it in your account settings in order to create new group chats.' : Tooltip to warn the user to change a setting to activate an action. + text: qsTr('newChatRoomUriMissing') + } } ActionButton { @@ -228,12 +236,20 @@ ApplicationWindow { backgroundRadius: 4 colorSet: MainWindowStyle.buttons.newConference visible: SettingsModel.conferenceEnabled + enabled: SettingsModel.videoConferenceEnabled tooltipText:qsTr('newConferenceButton') onClicked: { window.detachVirtualWindow() window.attachVirtualWindow(Utils.buildAppDialogUri('NewConference') ,{}) } + TooltipArea{ + visible: !SettingsModel.videoConferenceEnabled + maxWidth: smartSearchBar.width + delay:0 + //: 'Video conference URI is not set. You have to change it in your account settings in order to create new conferences.' : Tooltip to warn the user to change a setting to activate an action. + text: qsTr('newConferenceUriMissing') + } } ActionButton { @@ -311,7 +327,7 @@ ApplicationWindow { overwriteColor: isSelected ? MainWindowStyle.menu.conferences.selectedColor : MainWindowStyle.menu.conferences.color //: 'Conferences' : Conference title for main window. name: qsTr('mainWindowConferencesTitle').toUpperCase() - visible: SettingsModel.conferenceEnabled + visible: SettingsModel.videoConferenceEnabled && SettingsModel.conferenceEnabled onSelected: { timeline.model.unselectAll() diff --git a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml index 1850e7a56..e3563a675 100644 --- a/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml +++ b/linphone-app/ui/views/App/Styles/Calls/VideoConferenceStyle.qml @@ -11,7 +11,7 @@ QtObject { property string sectionName: 'VideoConference' property color backgroundColor: ColorsList.add(sectionName+'_bg', 'conference_bg').color property color fullBackgroundColor: ColorsList.add(sectionName+'_fullscreen_bg', 'fullscreen_conference_bg').color - property color buzyColor: ColorsList.add(sectionName+'_indicator', 'i').color + property color buzyColor: ColorsList.add(sectionName+'_indicator', 'q').color property QtObject title: QtObject { property color color: ColorsList.add(sectionName+'_title', 'q').color diff --git a/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml b/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml index 41cb2d24e..894428f3a 100644 --- a/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml +++ b/linphone-app/ui/views/App/Styles/Main/ConversationStyle.qml @@ -63,9 +63,11 @@ QtObject { property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 's_n_b_bg').color property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 's_h_b_bg').color property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 's_p_b_bg').color + property color backgroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_u', icon, 's_p_b_bg').color property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 's_n_b_fg').color property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 's_h_b_fg').color property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 's_p_b_fg').color + property color foregroundUpdatingColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_u', icon, 's_p_b_fg').color } property QtObject videoCall: QtObject { diff --git a/linphone-app/ui/views/App/Styles/Main/MainWindowStyle.qml b/linphone-app/ui/views/App/Styles/Main/MainWindowStyle.qml index c00265d25..655779f01 100644 --- a/linphone-app/ui/views/App/Styles/Main/MainWindowStyle.qml +++ b/linphone-app/ui/views/App/Styles/Main/MainWindowStyle.qml @@ -103,9 +103,11 @@ QtObject { property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'ma_n_b_bg').color property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'ma_h_b_bg').color property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'ma_p_b_bg').color + property color backgroundDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_d', icon, 'ma_d_b_bg').color property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'ma_n_b_fg').color property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'ma_h_b_fg').color property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'ma_p_b_fg').color + property color foregroundDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_d', icon, 'ma_d_b_fg').color } property QtObject newConference: QtObject { property int iconSize: 40 @@ -114,9 +116,11 @@ QtObject { property color backgroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_n', icon, 'ma_n_b_bg').color property color backgroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_h', icon, 'ma_h_b_bg').color property color backgroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_p', icon, 'ma_p_b_bg').color + property color backgroundDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_bg_d', icon, 'ma_d_b_bg').color property color foregroundNormalColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_n', icon, 'ma_n_b_fg').color property color foregroundHoveredColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_h', icon, 'ma_h_b_fg').color property color foregroundPressedColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_p', icon, 'ma_p_b_fg').color + property color foregroundDisabledColor : ColorsList.addImageColor(sectionName+'_'+name+'_fg_d', icon, 'ma_d_b_fg').color } property QtObject burgerMenu: QtObject { property int iconSize: 40 diff --git a/linphone-sdk b/linphone-sdk index eb2849228..4a16a9fb5 160000 --- a/linphone-sdk +++ b/linphone-sdk @@ -1 +1 @@ -Subproject commit eb2849228136e76de2e885fbf6dfb5196acfd819 +Subproject commit 4a16a9fb59fba50bf4902a8631a42f71795824b9