logger.py do the replacements, not history_windows.py

This commit is contained in:
Yann Leboulanger 2005-05-11 17:48:30 +00:00
parent a88696772a
commit 6ab10d5fe5
2 changed files with 1 additions and 3 deletions

View File

@ -98,6 +98,7 @@ class Logger:
while nb < end_line: while nb < end_line:
line = fic.readline() line = fic.readline()
if line: if line:
line = line.replace('\\n', '\n')
lineSplited = line.split(':') lineSplited = line.split(':')
if len(lineSplited) > 2: if len(lineSplited) > 2:
lines.append(lineSplited) lines.append(lineSplited)

View File

@ -129,17 +129,14 @@ class History_window:
buffer.insert(start_iter, tim) buffer.insert(start_iter, tim)
if type == 'recv': if type == 'recv':
msg = ':'.join(data[0:]) msg = ':'.join(data[0:])
msg = msg.replace('\\n', '\n')
buffer.insert_with_tags_by_name(start_iter, msg, buffer.insert_with_tags_by_name(start_iter, msg,
'incoming') 'incoming')
elif type == 'sent': elif type == 'sent':
msg = ':'.join(data[0:]) msg = ':'.join(data[0:])
msg = msg.replace('\\n', '\n')
buffer.insert_with_tags_by_name(start_iter, msg, buffer.insert_with_tags_by_name(start_iter, msg,
'outgoing') 'outgoing')
else: else:
msg = ':'.join(data[1:]) msg = ':'.join(data[1:])
msg = msg.replace('\\n', '\n')
buffer.insert_with_tags_by_name(start_iter, buffer.insert_with_tags_by_name(start_iter,
_('Status is now: ') + data[0] _('Status is now: ') + data[0]
+ ': ' + msg, 'status') + ': ' + msg, 'status')