diff options
author | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-12-15 15:40:43 +0000 |
---|---|---|
committer | louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13> | 2010-12-15 15:40:43 +0000 |
commit | 0db8bf7d461e1d618ae7efb2f00dc2d99ddf7ca3 (patch) | |
tree | 38cf0930bb62a1b26dde8e24644694e94a73f234 /src/core.py | |
parent | 24d6894b64455ca1135a8b43ddf4ddbf94365a96 (diff) | |
download | poezio-0db8bf7d461e1d618ae7efb2f00dc2d99ddf7ca3.tar.gz poezio-0db8bf7d461e1d618ae7efb2f00dc2d99ddf7ca3.tar.bz2 poezio-0db8bf7d461e1d618ae7efb2f00dc2d99ddf7ca3.tar.xz poezio-0db8bf7d461e1d618ae7efb2f00dc2d99ddf7ca3.zip |
HUGE performance improvement on refresh. fixed #1855
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core.py b/src/core.py index ac0d709e..3fcfabfb 100644 --- a/src/core.py +++ b/src/core.py @@ -40,6 +40,7 @@ log = logging.getLogger(__name__) import multiuserchat as muc import tabs +import windows from connection import connection from config import config @@ -83,6 +84,8 @@ class Core(object): self.stdscr = curses.initscr() self.init_curses(self.stdscr) self.xmpp = xmpp + self.information_buffer = TextBuffer() + self.information_win_size = 0 # Todo, get this from config default_tab = tabs.InfoTab(self, "Info") if self.xmpp.anon\ else tabs.RosterInfoTab(self) default_tab.on_gain_focus() @@ -90,8 +93,7 @@ class Core(object): # a unique buffer used to store global informations # that are displayed in almost all tabs, in an # information window. - self.information_buffer = TextBuffer() - self.information_win_size = 2 # Todo, get this from config + self.resize_timer = None self.previous_tab_nb = 0 self.own_nick = config.get('own_nick', self.xmpp.boundjid.bare) @@ -548,7 +550,6 @@ class Core(object): Resize the whole screen """ with resize_lock: - # self.resize_timer = None for tab in self.tabs: tab.resize() self.refresh_window() @@ -1225,6 +1226,7 @@ class Core(object): Displays an informational message in the "Info" room window """ self.information_buffer.add_message(msg, nickname=typ) + # TODO: refresh only the correct window in the current tab self.refresh_window() def command_quit(self, arg): |