From 9e93e8d2450a9248fe9c3105292d1ac410ab0874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Sat, 4 Oct 2025 14:30:07 +0200 Subject: [PATCH 1/2] libcmatrix: Forward to v0.0.4 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Guido Günther Part-of: --- subprojects/libcmatrix.wrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subprojects/libcmatrix.wrap b/subprojects/libcmatrix.wrap index d2330b6f..f2c25dba 100644 --- a/subprojects/libcmatrix.wrap +++ b/subprojects/libcmatrix.wrap @@ -1,5 +1,5 @@ [wrap-git] directory=libcmatrix url=https://source.puri.sm/Librem5/libcmatrix.git -revision=v0.0.3 +revision=v0.0.4 depth=1 -- GitLab From 9a52ea352b933992f06779001370ba4c796de096 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Thu, 21 Aug 2025 14:30:04 +0200 Subject: [PATCH 2/2] matrix: Print room version when available MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only works for new rooms where we persisted the room event. Signed-off-by: Guido Günther Part-of: --- src/dialogs/chatty-ma-chat-info.c | 10 ++++++++-- src/matrix/chatty-ma-chat.c | 8 ++++++++ src/matrix/chatty-ma-chat.h | 1 + src/ui/chatty-ma-chat-info.ui | 8 +++++++- 4 files changed, 24 insertions(+), 3 deletions(-) diff --git a/src/dialogs/chatty-ma-chat-info.c b/src/dialogs/chatty-ma-chat-info.c index cf36c51f..872e43d6 100644 --- a/src/dialogs/chatty-ma-chat-info.c +++ b/src/dialogs/chatty-ma-chat-info.c @@ -48,6 +48,7 @@ struct _ChattyMaChatInfo GtkWidget *name_row; GtkWidget *matrix_id_row; GtkWidget *topic_row; + GtkWidget *room_version_row; GtkWidget *encryption_spinner; GtkWidget *encryption_row; @@ -138,7 +139,7 @@ chatty_ma_chat_info_set_item (ChattyChatInfo *info, ChattyChat *chat) { ChattyMaChatInfo *self = (ChattyMaChatInfo *)info; - const char *topic; + const char *topic, *room_version; g_assert (CHATTY_IS_MA_CHAT_INFO (self)); g_assert (!chat || CHATTY_IS_MA_CHAT (chat)); @@ -161,10 +162,14 @@ chatty_ma_chat_info_set_item (ChattyChatInfo *info, topic = chatty_ma_chat_get_topic (CHATTY_MA_CHAT (self->chat)); gtk_widget_set_visible (self->topic_row, !!topic); - if (topic) adw_action_row_set_subtitle (ADW_ACTION_ROW (self->topic_row), topic); + room_version = chatty_ma_chat_get_room_version (CHATTY_MA_CHAT (self->chat)); + gtk_widget_set_visible (self->room_version_row, !!room_version); + if (room_version) + adw_action_row_set_subtitle (ADW_ACTION_ROW (self->room_version_row), room_version); + g_signal_connect_swapped (self->chat, "notify::encrypt", G_CALLBACK (ma_chat_encrypt_changed_cb), self); @@ -214,6 +219,7 @@ chatty_ma_chat_info_class_init (ChattyMaChatInfoClass *klass) gtk_widget_class_bind_template_child (widget_class, ChattyMaChatInfo, name_row); gtk_widget_class_bind_template_child (widget_class, ChattyMaChatInfo, matrix_id_row); gtk_widget_class_bind_template_child (widget_class, ChattyMaChatInfo, topic_row); + gtk_widget_class_bind_template_child (widget_class, ChattyMaChatInfo, room_version_row); gtk_widget_class_bind_template_child (widget_class, ChattyMaChatInfo, encryption_spinner); gtk_widget_class_bind_template_child (widget_class, ChattyMaChatInfo, encryption_row); gtk_widget_class_bind_template_child (widget_class, ChattyMaChatInfo, members_group); diff --git a/src/matrix/chatty-ma-chat.c b/src/matrix/chatty-ma-chat.c index cabe7a00..2d9b2e64 100644 --- a/src/matrix/chatty-ma-chat.c +++ b/src/matrix/chatty-ma-chat.c @@ -1051,3 +1051,11 @@ chatty_ma_chat_get_topic (ChattyMaChat *self) return cm_room_get_topic (self->cm_room); } + +const char * +chatty_ma_chat_get_room_version (ChattyMaChat *self) +{ + g_return_val_if_fail (CHATTY_IS_MA_CHAT (self), NULL); + + return cm_room_get_room_version (self->cm_room); +} diff --git a/src/matrix/chatty-ma-chat.h b/src/matrix/chatty-ma-chat.h index c655dbae..c403383a 100644 --- a/src/matrix/chatty-ma-chat.h +++ b/src/matrix/chatty-ma-chat.h @@ -26,6 +26,7 @@ ChattyMaChat *chatty_ma_chat_new_with_room (CmRoom *room); CmRoom *chatty_ma_chat_get_cm_room (ChattyMaChat *self); gboolean chatty_ma_chat_can_set_encryption (ChattyMaChat *self); const char *chatty_ma_chat_get_topic (ChattyMaChat *self); +const char *chatty_ma_chat_get_room_version (ChattyMaChat *self); void chatty_ma_chat_set_data (ChattyMaChat *self, ChattyAccount *account, gpointer client); diff --git a/src/ui/chatty-ma-chat-info.ui b/src/ui/chatty-ma-chat-info.ui index ca406307..9dfac143 100644 --- a/src/ui/chatty-ma-chat-info.ui +++ b/src/ui/chatty-ma-chat-info.ui @@ -30,11 +30,17 @@ - + Topic + + + + Room version + + -- GitLab