summaryrefslogtreecommitdiff
path: root/poezio/windows/info_wins.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/windows/info_wins.py')
-rw-r--r--poezio/windows/info_wins.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/poezio/windows/info_wins.py b/poezio/windows/info_wins.py
index 4ca72449..da470cb5 100644
--- a/poezio/windows/info_wins.py
+++ b/poezio/windows/info_wins.py
@@ -304,3 +304,21 @@ class BookmarksInfoWin(InfoWin):
def write_remote_status(self, preferred):
self.addstr('Remote storage: %s' % preferred, to_curses_attr(get_theme().COLOR_INFORMATION_BAR))
+class ConfirmStatusWin(Win):
+ def __init__(self, text, critical=False):
+ Win.__init__(self)
+ self.text = text
+ self.critical = critical
+
+ def refresh(self):
+ log.debug('Refresh: %s', self.__class__.__name__)
+ self._win.erase()
+ if self.critical:
+ color = get_theme().COLOR_WARNING_PROMPT
+ else:
+ color = get_theme().COLOR_INFORMATION_BAR
+ c_color = to_curses_attr(color)
+ self.addstr(self.text, c_color)
+ self.finish_line(color)
+ self._refresh()
+