diff options
author | Yann Leboulanger <asterix@lagaule.org> | 2013-10-28 22:24:11 +0400 |
---|---|---|
committer | Yann Leboulanger <asterix@lagaule.org> | 2013-10-28 22:24:11 +0400 |
commit | 1b9672560dcd354d16e5f1b1f335c41cc30a7336 (patch) | |
tree | ed2cf1b4e944116e70f519d079bdd554312412fe /src/conversation_textview.py | |
parent | bbca2284ac7dd8715a695869e0b059450595204e (diff) |
use ✓ and ✖ instead of gtk-yes / gtk-no icons for XEP-184 marks. Fixes #7445, see #7476
Diffstat (limited to 'src/conversation_textview.py')
-rw-r--r-- | src/conversation_textview.py | 27 |
1 files changed, 7 insertions, 20 deletions
diff --git a/src/conversation_textview.py b/src/conversation_textview.py index d2d833408..1492a1742 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -175,8 +175,6 @@ class ConversationTextview(GObject.GObject): FOCUS_OUT_LINE_PIXBUF = gtkgui_helpers.get_icon_pixmap( 'gajim-muc_separator') - XEP0184_WARNING_PIXBUF = gtkgui_helpers.get_icon_pixmap('gtk-no') - XEP0184_RECEIVED_PIXBUF = gtkgui_helpers.get_icon_pixmap('gtk-yes') MESSAGE_CORRECTED_PIXBUF = gtkgui_helpers.get_icon_pixmap('gtk-spell-check') # smooth scroll constants @@ -315,6 +313,10 @@ class ConversationTextview(GObject.GObject): self.displaymarking_tags = {} tag = buffer_.create_tag('xep0184-warning') + tag.set_property('foreground', 'red') + + tag = buffer_.create_tag('xep0184-received') + tag.set_property('foreground', 'green') # One mark at the begining then 2 marks between each lines size = gajim.config.get('max_conversation_lines') @@ -516,18 +518,7 @@ class ConversationTextview(GObject.GObject): return False end_iter = buffer_.get_iter_at_mark(self.xep0184_marks[id_]) - buffer_.insert(end_iter, ' ') - anchor = buffer_.create_child_anchor(end_iter) - img = TextViewImage(anchor, '') - img.set_from_pixbuf(ConversationTextview.XEP0184_WARNING_PIXBUF) - img.show() - self.tv.add_child_at_anchor(img, anchor) - before_img_iter = buffer_.get_iter_at_mark(self.xep0184_marks[id_]) - before_img_iter.forward_char() - post_img_iter = before_img_iter.copy() - post_img_iter.forward_char() - buffer_.apply_tag_by_name('xep0184-warning', before_img_iter, - post_img_iter) + buffer_.insert_with_tags_by_name(end_iter, ' ✖', 'xep0184-warning') self.xep0184_shown[id_] = SHOWN return False @@ -554,12 +545,8 @@ class ConversationTextview(GObject.GObject): if gajim.config.get('positive_184_ack'): begin_iter = buffer_.get_iter_at_mark(self.xep0184_marks[id_]) - buffer_.insert(begin_iter, ' ') - anchor = buffer_.create_child_anchor(begin_iter) - img = TextViewImage(anchor, '') - img.set_from_pixbuf(ConversationTextview.XEP0184_RECEIVED_PIXBUF) - img.show() - self.tv.add_child_at_anchor(img, anchor) + buffer_.insert_with_tags_by_name(begin_iter, ' ✓', + 'xep0184-received') self.xep0184_shown[id_] = ALREADY_RECEIVED |