Do not print time for type info lines in GC
This commit is contained in:
parent
64fcd53cff
commit
169a69cca9
|
@ -576,9 +576,6 @@ class ConversationTextview:
|
||||||
other_tags_for_name = [], other_tags_for_time = [],
|
other_tags_for_name = [], other_tags_for_time = [],
|
||||||
other_tags_for_text = [], subject = None, old_kind = None):
|
other_tags_for_text = [], subject = None, old_kind = None):
|
||||||
'''prints 'chat' type messages'''
|
'''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 = self.tv.get_buffer()
|
||||||
buffer.begin_user_action()
|
buffer.begin_user_action()
|
||||||
end_iter = buffer.get_end_iter()
|
end_iter = buffer.get_end_iter()
|
||||||
|
@ -597,7 +594,7 @@ class ConversationTextview:
|
||||||
# We don't have tim for outgoing messages...
|
# We don't have tim for outgoing messages...
|
||||||
tim = time.localtime()
|
tim = time.localtime()
|
||||||
current_print_time = gajim.config.get('print_time')
|
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')
|
before_str = gajim.config.get('before_time')
|
||||||
after_str = gajim.config.get('after_time')
|
after_str = gajim.config.get('after_time')
|
||||||
# get difference in days since epoch (86400 = 24*3600)
|
# get difference in days since epoch (86400 = 24*3600)
|
||||||
|
@ -621,7 +618,7 @@ class ConversationTextview:
|
||||||
tim_format = time.strftime(format, tim).encode('utf-8')
|
tim_format = time.strftime(format, tim).encode('utf-8')
|
||||||
buffer.insert_with_tags_by_name(end_iter, tim_format + ' ',
|
buffer.insert_with_tags_by_name(end_iter, tim_format + ' ',
|
||||||
*other_tags_for_time)
|
*other_tags_for_time)
|
||||||
elif current_print_time == 'sometimes':
|
elif current_print_time == 'sometimes' and kind != 'info':
|
||||||
every_foo_seconds = 60 * gajim.config.get(
|
every_foo_seconds = 60 * gajim.config.get(
|
||||||
'print_ichat_every_foo_minutes')
|
'print_ichat_every_foo_minutes')
|
||||||
seconds_passed = time.mktime(tim) - self.last_time_printout
|
seconds_passed = time.mktime(tim) - self.last_time_printout
|
||||||
|
@ -639,6 +636,9 @@ class ConversationTextview:
|
||||||
|
|
||||||
buffer.insert_with_tags_by_name(end_iter, tim_format + '\n',
|
buffer.insert_with_tags_by_name(end_iter, tim_format + '\n',
|
||||||
'time_sometimes')
|
'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)
|
other_text_tag = self.detect_other_text_tag(text, kind)
|
||||||
text_tags = other_tags_for_text[:] # create a new list
|
text_tags = other_tags_for_text[:] # create a new list
|
||||||
if other_text_tag:
|
if other_text_tag:
|
||||||
|
|
Loading…
Reference in New Issue