print subject from received messages correctly. Fixes #8042

This commit is contained in:
Yann Leboulanger 2015-05-17 21:56:17 +02:00
parent d003e1135d
commit 92f14ae27c
1 changed files with 5 additions and 4 deletions

View File

@ -1231,10 +1231,11 @@ class ConversationTextview(GObject.GObject):
puny_tags = [(ttt.lookup(t) if isinstance(t, str) else t) for t in puny_tags]
buffer_.insert_with_tags(end_iter, " (%s)" % puny_text, *puny_tags)
def print_empty_line(self):
def print_empty_line(self, iter_=None):
buffer_ = self.tv.get_buffer()
end_iter = buffer_.get_end_iter()
buffer_.insert_with_tags_by_name(end_iter, '\n', 'eol')
if not iter_:
iter_ = buffer_.get_end_iter()
buffer_.insert_with_tags_by_name(iter_, '\n', 'eol')
self.just_cleared = False
def print_conversation_line(self, text, jid, kind, name, tim,
@ -1460,7 +1461,7 @@ class ConversationTextview(GObject.GObject):
else:
end_iter = buffer_.get_end_iter()
buffer_.insert(end_iter, subject)
self.print_empty_line()
self.print_empty_line(end_iter)
def print_real_text(self, text, text_tags=[], name=None, xhtml=None,
graphics=True, iter_=None):