From 83bf0631a5e3d1a17dde01a868edda487a46e68d Mon Sep 17 00:00:00 2001 From: fiaxh Date: Wed, 12 Sep 2018 00:29:03 +0200 Subject: Remove newlines from displayed MUC topics fixes #393 --- main/src/ui/conversation_titlebar/view.vala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'main/src/ui/conversation_titlebar') diff --git a/main/src/ui/conversation_titlebar/view.vala b/main/src/ui/conversation_titlebar/view.vala index 13a9bf80..4ca57e1c 100644 --- a/main/src/ui/conversation_titlebar/view.vala +++ b/main/src/ui/conversation_titlebar/view.vala @@ -61,7 +61,10 @@ public class ConversationTitlebar : Gtk.HeaderBar { if (subtitle != null) { set_subtitle(subtitle); } else if (conversation.type_ == Conversation.Type.GROUPCHAT) { - string subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account); + string? subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account); + if (subject != null) { + subject = (new Regex("\\s+")).replace_literal(subject, -1, 0, " "); + } set_subtitle(subject != "" ? subject : null); } else { set_subtitle(null); -- cgit v1.2.3-54-g00ecf