Skip to content
Snippets Groups Projects
Commit 169a69cc authored by jimpp's avatar jimpp
Browse files

Do not print time for type info lines in GC

parent 64fcd53c
No related branches found
No related tags found
No related merge requests found
......@@ -576,9 +576,6 @@ def print_conversation_line(self, text, jid, kind, name, tim,
other_tags_for_name = [], other_tags_for_time = [],
other_tags_for_text = [], subject = None, old_kind = None):
'''prints 'chat' type messages'''
# kind = info, we print things as if it was a status: same color, ...
if kind == 'info':
kind = 'status'
buffer = self.tv.get_buffer()
buffer.begin_user_action()
end_iter = buffer.get_end_iter()
......@@ -597,7 +594,7 @@ def print_conversation_line(self, text, jid, kind, name, tim,
# We don't have tim for outgoing messages...
tim = time.localtime()
current_print_time = gajim.config.get('print_time')
if current_print_time == 'always':
if current_print_time == 'always' and kind != 'info':
before_str = gajim.config.get('before_time')
after_str = gajim.config.get('after_time')
# get difference in days since epoch (86400 = 24*3600)
......@@ -621,7 +618,7 @@ def print_conversation_line(self, text, jid, kind, name, tim,
tim_format = time.strftime(format, tim).encode('utf-8')
buffer.insert_with_tags_by_name(end_iter, tim_format + ' ',
*other_tags_for_time)
elif current_print_time == 'sometimes':
elif current_print_time == 'sometimes' and kind != 'info':
every_foo_seconds = 60 * gajim.config.get(
'print_ichat_every_foo_minutes')
seconds_passed = time.mktime(tim) - self.last_time_printout
......@@ -639,6 +636,9 @@ def print_conversation_line(self, text, jid, kind, name, tim,
buffer.insert_with_tags_by_name(end_iter, tim_format + '\n',
'time_sometimes')
# kind = info, we print things as if it was a status: same color, ...
if kind == 'info':
kind = 'status'
other_text_tag = self.detect_other_text_tag(text, kind)
text_tags = other_tags_for_text[:] # create a new list
if other_text_tag:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment