add time of stanza in XML console

This commit is contained in:
Yann Leboulanger 2013-09-04 17:31:12 +02:00
parent d81f296e4c
commit 6d4c849ca0
1 changed files with 5 additions and 2 deletions

View File

@ -37,6 +37,7 @@ from gi.repository import GLib
import cairo import cairo
import os import os
import nbxmpp import nbxmpp
import time
import gtkgui_helpers import gtkgui_helpers
import vcard import vcard
@ -3458,9 +3459,11 @@ class XMLConsoleWindow:
type_ = kind # 'incoming' or 'outgoing' type_ = kind # 'incoming' or 'outgoing'
if kind == 'incoming': if kind == 'incoming':
buffer.insert_with_tags_by_name(end_iter, '<!-- In -->\n', type_) buffer.insert_with_tags_by_name(end_iter, '<!-- In %s -->\n' % \
time.strftime('%c'), type_)
elif kind == 'outgoing': elif kind == 'outgoing':
buffer.insert_with_tags_by_name(end_iter, '<!-- Out -->\n', type_) buffer.insert_with_tags_by_name(end_iter, '<!-- Out %s -->\n' % \
time.strftime('%c'), type_)
end_iter = buffer.get_end_iter() 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', type_) + '\n\n', type_)