From f9734cde5623aaf701e222b00d5eebdf7a152772 Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 20 Oct 2014 21:04:14 +0200 Subject: Remove the (sometimes wrong) default values in the config.get() calls --- src/windows/text_win.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/windows/text_win.py') diff --git a/src/windows/text_win.py b/src/windows/text_win.py index de9b0625..4c6b9a18 100644 --- a/src/windows/text_win.py +++ b/src/windows/text_win.py @@ -19,7 +19,7 @@ from theming import to_curses_attr, get_theme, dump_tuple class TextWin(Win): - def __init__(self, lines_nb_limit=config.get('max_lines_in_memory', 2048)): + def __init__(self, lines_nb_limit=config.get('max_lines_in_memory')): Win.__init__(self) self.lines_nb_limit = lines_nb_limit self.pos = 0 @@ -265,7 +265,7 @@ class TextWin(Win): lines = self.built_lines[-self.height:] else: lines = self.built_lines[-self.height-self.pos:-self.pos] - with_timestamps = config.get("show_timestamps", True) + with_timestamps = config.get("show_timestamps") with g_lock: self._win.move(0, 0) self._win.erase() @@ -405,7 +405,7 @@ class TextWin(Win): def rebuild_everything(self, room): self.built_lines = [] - with_timestamps = config.get("show_timestamps", True) + with_timestamps = config.get('show_timestamps') for message in room.messages: self.build_new_message(message, clean=False, timestamp=with_timestamps) if self.separator_after is message: @@ -418,7 +418,7 @@ class TextWin(Win): Find a message, and replace it with a new one (instead of rebuilding everything in order to correct a message) """ - with_timestamps = config.get("show_timestamps", True) + with_timestamps = config.get('show_timestamps') for i in range(len(self.built_lines)-1, -1, -1): if self.built_lines[i] and self.built_lines[i].msg.identifier == old_id: index = i -- cgit v1.2.3