summaryrefslogtreecommitdiff
path: root/src/core.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.py')
-rw-r--r--src/core.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core.py b/src/core.py
index 4a2cc91f..8d1fde3a 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,10 +183,20 @@ 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)
self.information(_('Welcome to poezio!'))
+ if config.get('firstrun', ''):
+ self.information(_(
+ 'It seems that it is the first time you start poezio.\n' + \
+ 'The configuration help is here: http://dev.louiz.org/project/poezio/doc/HowToConfigure\n' + \
+ 'And the documentation for users is here: http://dev.louiz.org/project/poezio/doc/HowToUse\n' + \
+ 'By default, you are in poezio’s chatroom, where you can ask for help or tell us how great it is.\n' + \
+ 'Just press Ctrl-n.' \
+ ))
self.refresh_window()
def resize_global_information_win(self):
@@ -195,6 +206,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
@@ -676,6 +694,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':