[tpatnoe] add In and Out comment in XML console. Fixes #4977
This commit is contained in:
parent
8ccba78a15
commit
27ea3d9f14
1 changed files with 12 additions and 0 deletions
|
@ -2506,9 +2506,14 @@ class XMLConsoleWindow:
|
||||||
self.tagIn = buffer_.create_tag('incoming')
|
self.tagIn = buffer_.create_tag('incoming')
|
||||||
color = gajim.config.get('inmsgcolor')
|
color = gajim.config.get('inmsgcolor')
|
||||||
self.tagIn.set_property('foreground', color)
|
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')
|
self.tagOut = buffer_.create_tag('outgoing')
|
||||||
color = gajim.config.get('outmsgcolor')
|
color = gajim.config.get('outmsgcolor')
|
||||||
self.tagOut.set_property('foreground', color)
|
self.tagOut.set_property('foreground', color)
|
||||||
|
self.tagOutComment = buffer_.create_tag('out_comment')
|
||||||
|
self.tagOutComment.set_property('foreground', color)
|
||||||
|
|
||||||
self.enabled = False
|
self.enabled = False
|
||||||
|
|
||||||
|
@ -2562,6 +2567,13 @@ class XMLConsoleWindow:
|
||||||
if end_rect.y <= (visible_rect.y + visible_rect.height):
|
if end_rect.y <= (visible_rect.y + visible_rect.height):
|
||||||
at_the_end = True
|
at_the_end = True
|
||||||
end_iter = buffer.get_end_iter()
|
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<') + \
|
buffer.insert_with_tags_by_name(end_iter, stanza.replace('><', '>\n<') + \
|
||||||
'\n\n', kind)
|
'\n\n', kind)
|
||||||
if at_the_end:
|
if at_the_end:
|
||||||
|
|
Loading…
Add table
Reference in a new issue