diff options
author | fiaxh <git@mx.ax.lt> | 2018-09-12 00:29:03 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2018-09-12 00:29:03 +0200 |
commit | 83bf0631a5e3d1a17dde01a868edda487a46e68d (patch) | |
tree | d7ceebbe2f6f10560981df60fd26dfde6ec2075a | |
parent | f87611412660b89ee9451820fc9c58162a11e243 (diff) | |
download | dino-83bf0631a5e3d1a17dde01a868edda487a46e68d.tar.gz dino-83bf0631a5e3d1a17dde01a868edda487a46e68d.zip |
Remove newlines from displayed MUC topics
fixes #393
-rw-r--r-- | main/src/ui/conversation_titlebar/view.vala | 5 |
1 files changed, 4 insertions, 1 deletions
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); |