diff options
author | fiaxh <git@mx.ax.lt> | 2017-08-27 23:55:49 +0200 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-08-28 00:02:59 +0200 |
commit | 8bc0d107e740be468ee0c9dcd253de36355088d3 (patch) | |
tree | 36858e844d711eb18a68612fd815cb84f4c3a88f /main/src/ui/conversation_summary/message_textview.vala | |
parent | a807ded65cd907e04bab7b8cd27b5702b157e3a2 (diff) | |
download | dino-8bc0d107e740be468ee0c9dcd253de36355088d3.tar.gz dino-8bc0d107e740be468ee0c9dcd253de36355088d3.zip |
Plugins providing conversation items for ConversationView
Diffstat (limited to 'main/src/ui/conversation_summary/message_textview.vala')
-rw-r--r-- | main/src/ui/conversation_summary/message_textview.vala | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/main/src/ui/conversation_summary/message_textview.vala b/main/src/ui/conversation_summary/message_textview.vala index 80759207..f2a4ca22 100644 --- a/main/src/ui/conversation_summary/message_textview.vala +++ b/main/src/ui/conversation_summary/message_textview.vala @@ -27,7 +27,11 @@ public class MessageTextView : TextView { minimum_width = 0; } - public void add_text(string text) { + public void add_text(string text_) { + string text = text_; + if (text.length > 10000) { + text = text.slice(0, 10000) + " [" + _("Message too long") + "]"; + } TextIter end; buffer.get_end_iter(out end); buffer.insert(ref end, text, -1); @@ -90,4 +94,4 @@ public class MessageTextView : TextView { } } -}
\ No newline at end of file +} |