From afd351496512006be996e42cd0b5def9092d0c6d Mon Sep 17 00:00:00 2001 From: gaelle Date: Fri, 21 Nov 2025 09:44:15 +0100 Subject: [PATCH] hide chat button if not supported for conference #LINQT-2192 --- Linphone/core/conference/ConferenceCore.cpp | 5 ++++ Linphone/core/conference/ConferenceCore.hpp | 4 +++ Linphone/data/languages/de.ts | 26 +++++++++---------- Linphone/data/languages/en.ts | 26 +++++++++---------- Linphone/data/languages/fr.ts | 26 +++++++++---------- .../view/Page/Window/Call/CallsWindow.qml | 1 + 6 files changed, 49 insertions(+), 39 deletions(-) diff --git a/Linphone/core/conference/ConferenceCore.cpp b/Linphone/core/conference/ConferenceCore.cpp index 9b9ddb5b0..d0b10f83f 100644 --- a/Linphone/core/conference/ConferenceCore.cpp +++ b/Linphone/core/conference/ConferenceCore.cpp @@ -47,6 +47,7 @@ ConferenceCore::ConferenceCore(const std::shared_ptr &conf mIsLocalScreenSharing = mConferenceModel->isLocalScreenSharing(); mIsScreenSharingEnabled = mConferenceModel->isScreenSharingEnabled(); mIsRecording = conference->isRecording(); + if (conference->getCurrentParams()) mIsChatEnabled = conference->getCurrentParams()->chatEnabled(); auto me = conference->getMe(); auto confAddress = conference->getConferenceAddress(); if (confAddress) { @@ -205,6 +206,10 @@ void ConferenceCore::setIsScreenSharingEnabled(bool state) { } } +bool ConferenceCore::isChatEnabled() const { + return mIsChatEnabled; +} + std::shared_ptr ConferenceCore::getModel() const { return mConferenceModel; } diff --git a/Linphone/core/conference/ConferenceCore.hpp b/Linphone/core/conference/ConferenceCore.hpp index 25d93fe47..19ce64657 100644 --- a/Linphone/core/conference/ConferenceCore.hpp +++ b/Linphone/core/conference/ConferenceCore.hpp @@ -37,6 +37,7 @@ class ConferenceCore : public QObject, public AbstractObject { Q_OBJECT public: Q_PROPERTY(QDateTime startDate READ getStartDate CONSTANT) + Q_PROPERTY(bool isChatEnabled READ isChatEnabled CONSTANT) // Q_PROPERTY(ParticipantDeviceList *participantDevices READ getParticipantDeviceList CONSTANT) // Q_PROPERTY(ParticipantModel* localParticipant READ getLocalParticipant NOTIFY localParticipantChanged) Q_PROPERTY(bool isReady MEMBER mIsReady WRITE setIsReady NOTIFY isReadyChanged) @@ -81,6 +82,8 @@ public: void setIsLocalScreenSharing(bool state); void setIsScreenSharingEnabled(bool state); + bool isChatEnabled() const; + std::shared_ptr getModel() const; //--------------------------------------------------------------------------- @@ -108,6 +111,7 @@ private: bool mIsRecording = false; bool mIsLocalScreenSharing = false; bool mIsScreenSharingEnabled = false; + bool mIsChatEnabled = false; QString mSubject; QString mConfUri; QDateTime mStartDate = QDateTime::currentDateTime(); diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 39d583dd6..9b7ad0126 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -1692,7 +1692,7 @@ - + call_action_show_dialer "Pavé numérique" Wähltastatur @@ -1717,7 +1717,7 @@ - + call_action_go_to_settings "Paramètres" Einstellungen @@ -1886,72 +1886,72 @@ Bildschirm teilen… - + call_open_chat_hint Open chat… - + call_rise_hand_hint "Lever la main" Hand heben - + call_send_reaction_hint "Envoyer une réaction" Reaktion senden - + call_manage_participants_hint "Gérer les participants" Teilnehmer verwalten - + call_more_options_hint "Plus d'options…" Weitere Optionen… - + call_action_change_conference_layout "Modifier la disposition" Layout ändern - + call_action_full_screen "Mode Plein écran" Vollbildmodus - + call_action_stop_recording "Terminer l'enregistrement" Aufnahme beenden - + call_action_record "Enregistrer l'appel" Anruf aufnehmen - + call_activate_speaker_hint "Activer le son" Lautsprecher aktivieren - + call_deactivate_speaker_hint "Désactiver le son" Lautsprecher stummschalten diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 6dc178188..16e870808 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -1669,7 +1669,7 @@ - + call_action_show_dialer "Pavé numérique" Dialer @@ -1694,7 +1694,7 @@ - + call_action_go_to_settings "Paramètres" Settings @@ -1863,72 +1863,72 @@ Share screen… - + call_open_chat_hint Open chat… Open conversation… - + call_rise_hand_hint "Lever la main" Rise hand - + call_send_reaction_hint "Envoyer une réaction" Send reaction - + call_manage_participants_hint "Gérer les participants" Manage participants - + call_more_options_hint "Plus d'options…" More options… - + call_action_change_conference_layout "Modifier la disposition" Change layout - + call_action_full_screen "Mode Plein écran" Full screen mode - + call_action_stop_recording "Terminer l'enregistrement" End recording - + call_action_record "Enregistrer l'appel" Record call - + call_activate_speaker_hint "Activer le son" Activate speaker - + call_deactivate_speaker_hint "Désactiver le son" Mute speaker diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index 6a7c3dcc8..9bbcddda9 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -1669,7 +1669,7 @@ - + call_action_show_dialer "Pavé numérique" Pavé numérique @@ -1694,7 +1694,7 @@ - + call_action_go_to_settings "Paramètres" Paramètres @@ -1863,72 +1863,72 @@ Partager l'écran… - + call_open_chat_hint Open chat… Ouvrir le chat… - + call_rise_hand_hint "Lever la main" Lever la main - + call_send_reaction_hint "Envoyer une réaction" Envoyer une réaction - + call_manage_participants_hint "Gérer les participants" Gérer les participants - + call_more_options_hint "Plus d'options…" Plus d'options… - + call_action_change_conference_layout "Modifier la disposition" Modifier la disposition - + call_action_full_screen "Mode Plein écran" Mode Plein écran - + call_action_stop_recording "Terminer l'enregistrement" Terminer l'enregistrement - + call_action_record "Enregistrer l'appel" Enregistrer l'appel - + call_activate_speaker_hint "Activer le son" Activer le son - + call_deactivate_speaker_hint "Désactiver le son" Désactiver le son diff --git a/Linphone/view/Page/Window/Call/CallsWindow.qml b/Linphone/view/Page/Window/Call/CallsWindow.qml index bde37f29a..162e2dcdc 100644 --- a/Linphone/view/Page/Window/Call/CallsWindow.qml +++ b/Linphone/view/Page/Window/Call/CallsWindow.qml @@ -1500,6 +1500,7 @@ AbstractWindow { // Chat panel button CheckableButton { id: chatPanelButton + visible: !mainWindow.conference || mainWindow.conference.core.isChatEnabled iconUrl: AppIcons.chatTeardropText //: Open chat… ToolTip.text: qsTr("call_open_chat_hint")