Fix displaying links in textview

Regression from 79716f421f
This commit is contained in:
Philipp Hörist 2017-07-04 12:26:05 +02:00
parent 3d8be9ebe2
commit ab85729fe5
1 changed files with 11 additions and 11 deletions

View File

@ -953,17 +953,17 @@ class ConversationTextview(GObject.GObject):
end_iter = iter_
else:
end_iter = buffer_.get_end_iter()
if gajim.config.get('emoticons_theme') and graphics:
pixbuf = emoticons.get_pixbuf(possible_emot_ascii_caps)
if pixbuf:
# it's an emoticon
anchor = buffer_.create_child_anchor(end_iter)
img = TextViewImage(anchor,
GLib.markup_escape_text(special_text))
img.set_from_pixbuf(pixbuf)
img.show()
self.images.append(img)
self.tv.add_child_at_anchor(img, anchor)
pixbuf = emoticons.get_pixbuf(possible_emot_ascii_caps)
if gajim.config.get('emoticons_theme') and pixbuf and graphics:
# it's an emoticon
anchor = buffer_.create_child_anchor(end_iter)
img = TextViewImage(anchor,
GLib.markup_escape_text(special_text))
img.set_from_pixbuf(pixbuf)
img.show()
self.images.append(img)
self.tv.add_child_at_anchor(img, anchor)
elif special_text.startswith('www.') or \
special_text.startswith('ftp.') or \
text_is_valid_uri and not is_xhtml_link: