Author: jim++
Date: 2006-07-01 20:35:57 +0200 (Sat, 01 Jul 2006)
New Revision: 6520
Modified:
trunk/src/conversation_textview.py
Log:
Do not print time for type info lines in GC
Modified: trunk/src/conversation_textview.py
===================================================================
--- trunk/src/conversation_textview.py 2006-06-28 07:28:59 UTC (rev 6519)
+++ trunk/src/conversation_textview.py 2006-07-01 18:35:57 UTC (rev 6520)
@@ -576,9 +576,6 @@
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 @@
# 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 @@
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 @@
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: