summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2011-09-10 16:07:29 +0200
committermathieui <mathieui@mathieui.net>2011-09-10 16:07:29 +0200
commit62233527c5536b30f30221750975b93a055d1d28 (patch)
tree69d297695d6eb43a0a6ad069f6bb896dc96f6d8b /src/core.py
parenteb180ed52ee12784ec35213aa89413114a94297e (diff)
downloadpoezio-62233527c5536b30f30221750975b93a055d1d28.tar.gz
poezio-62233527c5536b30f30221750975b93a055d1d28.tar.bz2
poezio-62233527c5536b30f30221750975b93a055d1d28.tar.xz
poezio-62233527c5536b30f30221750975b93a055d1d28.zip
Fixes #2215
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index e25be58f..4691c54f 100644
--- a/src/core.py
+++ b/src/core.py
@@ -89,6 +89,7 @@ class Core(object):
self.information_buffer = TextBuffer()
self.information_win_size = config.get('info_win_height', 2, 'var')
self.information_win = windows.TextWin(20)
+ self.tab_win = windows.GlobalInfoBar()
self.information_buffer.add_window(self.information_win)
self.tabs = []
self.previous_tab_nb = 0
@@ -182,6 +183,8 @@ class Core(object):
tabs.Tab.resize(self.stdscr)
# resize the information_win to its initial size
self.resize_global_information_win()
+ # resize the global_info_bar to its initial size
+ self.resize_global_info_bar()
default_tab = tabs.RosterInfoTab()
default_tab.on_gain_focus()
self.tabs.append(default_tab)
@@ -195,6 +198,13 @@ class Core(object):
self.information_win.resize(self.information_win_size, tabs.Tab.width,
tabs.Tab.height - 2 - self.information_win_size, 0)
+
+ def resize_global_info_bar(self):
+ """
+ Resize the GlobalInfoBar only once at each resize
+ """
+ self.tab_win.resize(1, tabs.Tab.width, tabs.Tab.height - 2, 0)
+
def on_exception(self, typ, value, trace):
"""
When an exception is raised, just reset curses and call
@@ -675,6 +685,7 @@ class Core(object):
"""
tabs.Tab.resize(self.stdscr)
self.resize_global_information_win()
+ self.resize_global_info_bar()
with resize_lock:
for tab in self.tabs:
if config.get('lazy_resize', 'true') == 'true':