From a75965c14e908d3580ce7fe996de4a16501a2f3e Mon Sep 17 00:00:00 2001 From: Gaelle Braud Date: Thu, 11 Dec 2025 10:47:25 +0100 Subject: [PATCH] update presence when app visibility changes #LINQT-2237 --- Linphone/core/App.cpp | 3 +- Linphone/data/languages/de.ts | 99 ++++++++++---------- Linphone/data/languages/en.ts | 90 +++++++++--------- Linphone/data/languages/fr.ts | 90 +++++++++--------- Linphone/view/Page/Window/AbstractWindow.qml | 3 + 5 files changed, 143 insertions(+), 142 deletions(-) diff --git a/Linphone/core/App.cpp b/Linphone/core/App.cpp index f97789d5f..09fe38c38 100644 --- a/Linphone/core/App.cpp +++ b/Linphone/core/App.cpp @@ -1078,7 +1078,8 @@ void App::handleAppActivity() { if ((mMainWindow && mMainWindow->isActive() || (mCallsWindow && mCallsWindow->isActive())) && accountPresence == LinphoneEnums::Presence::Away) accountCore->lSetPresence(LinphoneEnums::Presence::Online); - if (((!mMainWindow || !mMainWindow->isActive()) && (!mCallsWindow || !mCallsWindow->isActive())) && + if (((!mMainWindow || !mMainWindow->isActive() || !mMainWindow->isVisible()) && + (!mCallsWindow || !mCallsWindow->isActive() || !mCallsWindow->isVisible())) && accountPresence == LinphoneEnums::Presence::Online) accountCore->lSetPresence(LinphoneEnums::Presence::Away); }; diff --git a/Linphone/data/languages/de.ts b/Linphone/data/languages/de.ts index 4a9131f20..2dd126b41 100644 --- a/Linphone/data/languages/de.ts +++ b/Linphone/data/languages/de.ts @@ -25,13 +25,13 @@ AbstractWindow - + contact_dialog_pick_phone_number_or_sip_address_title "Choisissez un numéro ou adresse SIP" Telefonnummer oder SIP-Adresse wählen - + fps_counter %1 FPS @@ -382,19 +382,16 @@ Kontoeinstellungen - info_popup_invalid_registrar_uri_message Registrar uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) - Die Registrar-URI ist ungültig. Bitte stellen Sie sicher, dass sie dem folgenden Format entspricht: sip:<host>:<port>;transport=<transport> (<port> ist optional) + Die Registrar-URI ist ungültig. Bitte stellen Sie sicher, dass sie dem folgenden Format entspricht: sip:<host>:<port>;transport=<transport> (<port> ist optional) - info_popup_invalid_outbound_proxy_message Outbound proxy uri is invalid. Please make sure it matches the following format : sip:<host>:<port>;transport=<transport> (:<port> is optional) - Die Ausgangsproxy-URI ist ungültig. Bitte stellen Sie sicher, dass sie dem folgenden Format entspricht: sip:<host>:<port>;transport=<transport> (<port> ist optional) + Die Ausgangsproxy-URI ist ungültig. Bitte stellen Sie sicher, dass sie dem folgenden Format entspricht: sip:<host>:<port>;transport=<transport> (<port> ist optional) - info_popup_error_title Fehler @@ -662,14 +659,14 @@ - + info_popup_error_title Error Fehler - + info_popup_configuration_failed_message Remote provisioning failed : %1 Remote-Provisionierung fehlgeschlagen: %1 @@ -709,86 +706,86 @@ Ihre Version ist auf dem neuesten Stand - + configuration_error_detail not reachable nicht erreichbar - + application_description "A free and open source SIP video-phone." Ein kostenloses Open-Source SIP Video-Telefon. - + command_line_arg_order "Send an order to the application towards a command line" Kommandozeilen-Befehl an die Anwendung schicken - + command_line_option_show_help Zeige Hilfe - + command_line_option_show_app_version App-Version anzeigen - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Abzurufende Linphone-Konfigurationsdatei angeben. Sie wird mit der aktuellen Konfiguration zusammengeführt. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, Pfad oder Datei - + command_line_option_minimized Minimieren - + command_line_option_log_to_stdout Debug-Informationen auf der Standardausgabe ausgeben - + command_line_option_print_app_logs_only "Print only logs from the application" Nur Anwendungs-Logs ausgeben - + hide_action "Cacher" "Afficher" Ausblenden - + show_action Zeigen - + quit_action "Quitter" Beenden - + check_for_update Check for update Auf Updates prüfen - + mark_all_read_action Alle als gelesen markieren @@ -2112,65 +2109,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… %1 schreibt… - + chat_message_draft_sending_text Entwurf: %1 - + chat_room_delete "Delete" Löschen - + chat_room_mute Stummschalten - + chat_room_unmute "Mute" Stummschaltung aufheben - + chat_room_mark_as_read "Mark as read" Als gelesen markieren - + chat_room_leave "leave" Verlassen - + chat_list_leave_chat_popup_title leave the conversation ? Chat verlassen? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? „Sie können in diesem Chat keine Nachrichten mehr senden oder empfangen. Möchten Sie fortfahren? - + chat_list_delete_chat_popup_title Delete the conversation ? Chat löschen? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? Dieser Chat und alle seine Nachrichten werden gelöscht. Möchten Sie fortfahren? @@ -2586,32 +2583,32 @@ Stellen Sie sicher, dass Sie keine sensiblen Informationen teilen! Keine Chats in der Historie - + chat_action_start_new_chat "New chat" Neuer Chat - + chat_start_group_chat_title "Nouveau groupe" Neuer Gruppenchat - + chat_action_start_group_chat "Créer" Erstellen - - - + + + information_popup_error_title Fehler - + information_popup_chat_creation_failed_message "La création a échoué" Erstellen fehlgeschlagen @@ -2622,25 +2619,25 @@ Stellen Sie sicher, dass Sie keine sensiblen Informationen teilen! Der Codec konnte nicht installiert werden. - + group_chat_error_must_have_name "Un nom doit être donné au groupe Für den Gruppenchat muss ein Name festgelegt werden - + group_chat_error_no_participant "Please select at least one participant - + group_call_error_not_connected "Vous n'etes pas connecté" Sie sind nicht verbunden - + chat_creation_in_progress Creation de la conversation en cours … Chat-Erstellung ausstehend… @@ -2785,7 +2782,7 @@ Stellen Sie sicher, dass Sie keine sensiblen Informationen teilen! close_accessible_name - Close %n + Close %1 Schließe %1 @@ -4623,19 +4620,19 @@ Ablauf: %1 MeetingListView - + meeting_info_cancelled "Réunion annulée" Besprechung abgesagt - + meetings_list_no_meeting_for_today "Aucune réunion aujourd'hui" Heute keine Besprechungen - + meeting_info_delete "Supprimer la réunion" Besprechung löschen @@ -5040,7 +5037,7 @@ Ablauf: %1 new_voice_message - 'Voice message received!' : message to warn the user in a notofication for voice messages. + 'Voice message received!' : message to warn the user in a notification for voice messages. Sprachnachricht empfangen! diff --git a/Linphone/data/languages/en.ts b/Linphone/data/languages/en.ts index 489759214..69ee97bbc 100644 --- a/Linphone/data/languages/en.ts +++ b/Linphone/data/languages/en.ts @@ -25,13 +25,13 @@ AbstractWindow - + contact_dialog_pick_phone_number_or_sip_address_title "Choisissez un numéro ou adresse SIP" Choose a SIP number or address - + fps_counter %1 FPS @@ -654,14 +654,14 @@ - + info_popup_error_title Error Error - + info_popup_configuration_failed_message Remote provisioning failed : %1 Remote provisioning failed : %1 @@ -701,86 +701,86 @@ Up to date Your version is up to date - + configuration_error_detail not reachable not reachable - + application_description "A free and open source SIP video-phone." A free and open source SIP video-phone. - + command_line_arg_order "Send an order to the application towards a command line" Send an order to the application towards a command line - + command_line_option_show_help Show this help - + command_line_option_show_app_version Show app version - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Specify the linphone configuration file to be fetched. It will be merged with the current configuration. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, path or file - + command_line_option_minimized Minimize - + command_line_option_log_to_stdout Log to stdout some debug information while running - + command_line_option_print_app_logs_only "Print only logs from the application" Print only logs from the application - + hide_action "Cacher" "Afficher" Hide - + show_action Show - + quit_action "Quitter" Quit - + check_for_update Check for update Check for update - + mark_all_read_action Marquer tout comme lu @@ -2086,65 +2086,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… %1 is writing… - + chat_message_draft_sending_text Draft : %1 - + chat_room_delete "Delete" Delete - + chat_room_mute Mute - + chat_room_unmute "Mute" Unmute - + chat_room_mark_as_read "Mark as read" Mark as read - + chat_room_leave "leave" Leave - + chat_list_leave_chat_popup_title leave the conversation ? Leave the conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? - + chat_list_delete_chat_popup_title Delete the conversation ? Delete the conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? This conversation and all its messages will be deleted. Do You want to continue ? @@ -2555,56 +2555,56 @@ Only your correspondent can decrypt them. No conversation in history - + chat_action_start_new_chat "New chat" New conversation - + chat_start_group_chat_title "Nouveau groupe" New group - + chat_action_start_group_chat "Créer" Create - - - + + + information_popup_error_title Error - + information_popup_chat_creation_failed_message "La création a échoué" Creation failed - + group_chat_error_must_have_name "Un nom doit être donné au groupe A name must be set for the group - + group_chat_error_no_participant "Please select at least one participant Please select at least one participant - + group_call_error_not_connected "Vous n'etes pas connecté" You are not connected - + chat_creation_in_progress Creation de la conversation en cours … Chat creation pending… @@ -4532,19 +4532,19 @@ Expiration : %1 MeetingListView - + meeting_info_cancelled "Réunion annulée" Meeting canceled - + meetings_list_no_meeting_for_today "Aucune réunion aujourd'hui" No meeting for today - + meeting_info_delete "Supprimer la réunion" Delete meeting @@ -4940,7 +4940,7 @@ Expiration : %1 new_voice_message - 'Voice message received!' : message to warn the user in a notofication for voice messages. + 'Voice message received!' : message to warn the user in a notification for voice messages. Voice message received! diff --git a/Linphone/data/languages/fr.ts b/Linphone/data/languages/fr.ts index cc026157f..94e481206 100644 --- a/Linphone/data/languages/fr.ts +++ b/Linphone/data/languages/fr.ts @@ -25,13 +25,13 @@ AbstractWindow - + contact_dialog_pick_phone_number_or_sip_address_title "Choisissez un numéro ou adresse SIP" Choisissez un numéro ou adresse SIP - + fps_counter %1 FPS @@ -654,14 +654,14 @@ - + info_popup_error_title Error Erreur - + info_popup_configuration_failed_message Remote provisioning failed : %1 La configuration distante a échoué : %1 @@ -701,86 +701,86 @@ Votre version est à jour - + configuration_error_detail not reachable indisponible - + application_description "A free and open source SIP video-phone." A free and open source SIP video-phone. - + command_line_arg_order "Send an order to the application towards a command line" Send an order to the application towards a command line - + command_line_option_show_help Show this help - + command_line_option_show_app_version Afficher la version de l'application - + command_line_option_config_to_fetch "Specify the linphone configuration file to be fetched. It will be merged with the current configuration." Specify the linphone configuration file to be fetched. It will be merged with the current configuration. - + command_line_option_config_to_fetch_arg "URL, path or file" URL, path or file - + command_line_option_minimized Minimiser - + command_line_option_log_to_stdout Log to stdout some debug information while running - + command_line_option_print_app_logs_only "Print only logs from the application" Print only logs from the application - + hide_action "Cacher" "Afficher" Cacher - + show_action Afficher - + quit_action "Quitter" Quitter - + check_for_update Check for update Rechercher une mise à jour - + mark_all_read_action Marquer tout comme lu @@ -2086,65 +2086,65 @@ ChatListView - + chat_message_is_writing_info %1 is writing… %1 est en train d'écrire… - + chat_message_draft_sending_text Brouillon : %1 - + chat_room_delete "Delete" Supprimer - + chat_room_mute Mettre en sourdine - + chat_room_unmute "Mute" Enlever la sourdine - + chat_room_mark_as_read "Mark as read" Marquer comme lu - + chat_room_leave "leave" Quitter la conversation - + chat_list_leave_chat_popup_title leave the conversation ? Quitter la conversation ? - + chat_list_leave_chat_popup_message You will not be able to send or receive messages in this conversation anymore. Do You want to continue ? Vous ne pourrez plus envoyer ou recevoir de messages dans cette conversation. Souhaitez-vous continuer ? - + chat_list_delete_chat_popup_title Delete the conversation ? Supprimer la conversation ? - + chat_list_delete_chat_popup_message This conversation and all its messages will be deleted. Do You want to continue ? La conversation et tous ses messages seront supprimés. Souhaitez-vous continuer ? @@ -2555,56 +2555,56 @@ en bout. Seul votre correspondant peut les déchiffrer. Aucune conversation dans votre historique - + chat_action_start_new_chat "New chat" Nouvelle conversation - + chat_start_group_chat_title "Nouveau groupe" Nouveau groupe - + chat_action_start_group_chat "Créer" Créer - - - + + + information_popup_error_title Erreur - + information_popup_chat_creation_failed_message "La création a échoué" La création a échoué - + group_chat_error_must_have_name "Un nom doit être donné au groupe Un nom doit être donné au groupe - + group_chat_error_no_participant "Please select at least one participant Veuillez sélectionner au moins un participant - + group_call_error_not_connected "Vous n'etes pas connecté" Vous n'êtes pas connecté - + chat_creation_in_progress Creation de la conversation en cours … Création de la conversation en cours… @@ -4532,19 +4532,19 @@ Expiration : %1 MeetingListView - + meeting_info_cancelled "Réunion annulée" Réunion annulée - + meetings_list_no_meeting_for_today "Aucune réunion aujourd'hui" Aucune réunion aujourd'hui - + meeting_info_delete "Supprimer la réunion" Supprimer la réunion @@ -4940,7 +4940,7 @@ Expiration : %1 new_voice_message - 'Voice message received!' : message to warn the user in a notofication for voice messages. + 'Voice message received!' : message to warn the user in a notification for voice messages. Message vocal reçu ! diff --git a/Linphone/view/Page/Window/AbstractWindow.qml b/Linphone/view/Page/Window/AbstractWindow.qml index 2b21920fe..8ef87fdf2 100644 --- a/Linphone/view/Page/Window/AbstractWindow.qml +++ b/Linphone/view/Page/Window/AbstractWindow.qml @@ -19,6 +19,9 @@ ApplicationWindow { onActiveChanged: { if (active) UtilsCpp.setLastActiveWindow(this) } + onVisibleChanged: { + AppCpp.handleAppActivity() + } Component.onDestruction: if (UtilsCpp.getLastActiveWindow() === this) UtilsCpp.setLastActiveWindow(null) property bool isFullscreen: visibility == Window.FullScreen