diff options
author | mathieui <mathieui@mathieui.net> | 2013-01-11 19:54:30 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-01-11 19:54:30 +0100 |
commit | b06240ee7b4940af52a0c01915214860d8a06bb2 (patch) | |
tree | 7f2be271ca8891b71a679e43ac735c1ac9fac0bc /src/windows.py | |
parent | b0fbbc9fa9c5a893d9babf0f8c86af04c32af019 (diff) | |
download | poezio-b06240ee7b4940af52a0c01915214860d8a06bb2.tar.gz poezio-b06240ee7b4940af52a0c01915214860d8a06bb2.tar.bz2 poezio-b06240ee7b4940af52a0c01915214860d8a06bb2.tar.xz poezio-b06240ee7b4940af52a0c01915214860d8a06bb2.zip |
Improve the xml tab
fix refresh bugs, display the scrolling status, add an info bar, add the
global info win
Diffstat (limited to 'src/windows.py')
-rw-r--r-- | src/windows.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/windows.py b/src/windows.py index f6d71fb2..22c5bec3 100644 --- a/src/windows.py +++ b/src/windows.py @@ -422,6 +422,26 @@ class InfoWin(Win): plus = ' -MORE(%s)-' % window.pos self.addstr(plus, to_curses_attr(get_theme().COLOR_SCROLLABLE_NUMBER)) +class XMLInfoWin(InfoWin): + """ + Info about the latest xml filter used and the state of the buffer. + """ + def __init__(self): + InfoWin.__init__(self) + + def refresh(self, filter_t='', filter='', window=None): + log.debug('Refresh: %s', self.__class__.__name__) + with g_lock: + self._win.erase() + if not filter_t: + self.addstr('[No filter]', to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) + else: + info = '[%s] %s' % (filter_t, filter) + self.addstr(info, to_curses_attr(get_theme().COLOR_INFORMATION_BAR)) + self.print_scroll_position(window) + self.finish_line(get_theme().COLOR_INFORMATION_BAR) + self._refresh() + class PrivateInfoWin(InfoWin): """ The live above the information window, displaying informations @@ -650,6 +670,7 @@ class TextWin(Win): self.release_lock() else: self.acquire_lock() + return self.lock def acquire_lock(self): self.lock = True |