add time of stanza in XML console
This commit is contained in:
parent
0ca5897271
commit
6a9ea72f9d
src
|
@ -33,6 +33,7 @@ import gtk
|
|||
import gobject
|
||||
import os
|
||||
import nbxmpp
|
||||
import time
|
||||
|
||||
import gtkgui_helpers
|
||||
import vcard
|
||||
|
@ -3423,9 +3424,11 @@ class XMLConsoleWindow:
|
|||
type_ = kind # 'incoming' or 'outgoing'
|
||||
|
||||
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':
|
||||
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()
|
||||
buffer.insert_with_tags_by_name(end_iter, stanza.replace('><', '>\n<') \
|
||||
+ '\n\n', type_)
|
||||
|
|
Loading…
Reference in New Issue