add time of stanza in XML console

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

View File

@ -33,6 +33,7 @@ import gtk
import gobject import gobject
import os import os
import nbxmpp import nbxmpp
import time
import gtkgui_helpers import gtkgui_helpers
import vcard import vcard
@ -3423,9 +3424,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_)