From 27ea3d9f14c179312f6b0e5b06f22449abf90359 Mon Sep 17 00:00:00 2001
From: Yann Leboulanger <asterix@lagaule.org>
Date: Wed, 22 Apr 2009 08:43:04 +0000
Subject: [PATCH] [tpatnoe] add In and Out comment in XML console. Fixes #4977

---
 src/dialogs.py | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/dialogs.py b/src/dialogs.py
index ac05b12f7c..e86b11d271 100644
--- a/src/dialogs.py
+++ b/src/dialogs.py
@@ -2506,9 +2506,14 @@ class XMLConsoleWindow:
 		self.tagIn = buffer_.create_tag('incoming')
 		color = gajim.config.get('inmsgcolor')
 		self.tagIn.set_property('foreground', color)
+		self.tagInComment = buffer_.create_tag('in_comment')
+		self.tagInComment.set_property('foreground', color)
+
 		self.tagOut = buffer_.create_tag('outgoing')
 		color = gajim.config.get('outmsgcolor')
 		self.tagOut.set_property('foreground', color)
+		self.tagOutComment = buffer_.create_tag('out_comment')
+		self.tagOutComment.set_property('foreground', color)
 
 		self.enabled = False
 
@@ -2562,6 +2567,13 @@ class XMLConsoleWindow:
 		if end_rect.y <= (visible_rect.y + visible_rect.height):
 			at_the_end = True
 		end_iter = buffer.get_end_iter()
+		if kind == 'incoming':
+			buffer.insert_with_tags_by_name(end_iter, '<!-- In -->\n', 
+					'in_comment')
+		elif kind == 'outgoing':
+			buffer.insert_with_tags_by_name(end_iter, '<!-- Out -->\n', 
+					'out_comment')
+		end_iter = buffer.get_end_iter()
 		buffer.insert_with_tags_by_name(end_iter, stanza.replace('><', '>\n<') + \
 			'\n\n', kind)
 		if at_the_end:
-- 
GitLab