summaryrefslogtreecommitdiff
path: root/src/windows/text_win.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-10-20 21:04:14 +0200
committermathieui <mathieui@mathieui.net>2014-10-20 21:21:04 +0200
commitf9734cde5623aaf701e222b00d5eebdf7a152772 (patch)
tree8f7b241df886d2c17eaee8f3630511631bf8cc3a /src/windows/text_win.py
parent7b01c62e07612a123f3ffe94583f51099e470c3b (diff)
downloadpoezio-f9734cde5623aaf701e222b00d5eebdf7a152772.tar.gz
poezio-f9734cde5623aaf701e222b00d5eebdf7a152772.tar.bz2
poezio-f9734cde5623aaf701e222b00d5eebdf7a152772.tar.xz
poezio-f9734cde5623aaf701e222b00d5eebdf7a152772.zip
Remove the (sometimes wrong) default values in the config.get() calls
Diffstat (limited to 'src/windows/text_win.py')
-rw-r--r--src/windows/text_win.py8
1 files changed, 4 insertions, 4 deletions
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