diff options
author | mathieui <mathieui@mathieui.net> | 2021-03-14 16:37:01 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2021-04-02 17:44:36 +0200 |
commit | 53633a5c4c8097c1cb356e5240be2a925fb8a631 (patch) | |
tree | f8fd79048fd19ce1846e28becafbd3b2aa9955b7 /poezio/tabs/basetabs.py | |
parent | b2fbb313ef4b88e62d5d41b5cb5862d643424f73 (diff) | |
download | poezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.tar.gz poezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.tar.bz2 poezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.tar.xz poezio-53633a5c4c8097c1cb356e5240be2a925fb8a631.zip |
refactor: rewrite config.get() to getbool, getstr, getint…
Diffstat (limited to 'poezio/tabs/basetabs.py')
-rw-r--r-- | poezio/tabs/basetabs.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index 4aa6a370..7e584a92 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -143,7 +143,7 @@ class Tab: Returns 1 or 0, depending on if we are using the vertical tab list or not. """ - if config.get('enable_vertical_tab_list'): + if config.getbool('enable_vertical_tab_list'): return 0 return 1 @@ -332,7 +332,7 @@ class Tab: return False def refresh_tab_win(self) -> None: - if config.get('enable_vertical_tab_list'): + if config.getbool('enable_vertical_tab_list'): left_tab_win = self.core.left_tab_win if left_tab_win and not self.size.core_degrade_x: left_tab_win.refresh() @@ -621,7 +621,7 @@ class ChatTab(Tab): for word in txt.split(): if len(word) >= 4 and word not in words: words.append(word) - words.extend([word for word in config.get('words').split(':') if word]) + words.extend([word for word in config.getlist('words') if word]) self.input.auto_completion(words, ' ', quotify=False) def on_enter(self): @@ -800,8 +800,8 @@ class ChatTab(Tab): text_buffer = self._text_buffer built_lines = [] message_count = 0 - timestamp = config.get('show_timestamps') - nick_size = config.get('max_nick_length') + timestamp = config.getbool('show_timestamps') + nick_size = config.getint('max_nick_length') theme = get_theme() for message in text_buffer.messages: # Build lines of a message |