changeset 3a0f3f363857 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=3a0f3f363857 description: fix not xhtml message in conversation textview
diffstat:
src/conversation_textview.py | 17 ++++++++++++----- 1 files changed, 12 insertions(+), 5 deletions(-)
diffs (41 lines):
diff -r 3e4063cb8527 -r 3a0f3f363857 src/conversation_textview.py --- a/src/conversation_textview.py Tue Jan 08 13:22:33 2013 +0400 +++ b/src/conversation_textview.py Tue Jan 08 14:13:52 2013 +0400 @@ -998,8 +998,10 @@ print_conversation_line() """ buffer_ = self.tv.get_buffer() - - insert_tags_func = buffer_.insert_with_tags_by_name + if other_tags: + insert_tags_func = buffer_.insert_with_tags_by_name + else: + insert_tags_func = buffer_.insert # detect_and_print_special_text() is also used by # HtmlHandler.handle_specials() and there tags is Gtk.TextTag objects, # not strings @@ -1026,7 +1028,10 @@ text_before_special_text = otext[index:start] end_iter = buffer_.get_end_iter() # we insert normal text - insert_tags_func(end_iter, text_before_special_text, *other_tags) + if other_tags: + insert_tags_func(end_iter, text_before_special_text, *other_tags) + else: + buffer_.insert(end_iter, text_before_special_text) index = end # update index
# now print it @@ -1158,8 +1163,10 @@ insert_tags_func = buffer_.insert_with_tags_by_name if other_tags and isinstance(other_tags[0], Gtk.TextTag): insert_tags_func = buffer_.insert_with_tags - - insert_tags_func(end_iter, special_text, *other_tags) + if other_tags: + insert_tags_func(end_iter, special_text, *other_tags) + else: + buffer_.insert(end_iter, special_text)
if tags: end_iter = buffer_.get_end_iter()