diff options
Diffstat (limited to 'interface/interface.py')
-rw-r--r-- | interface/interface.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/interface/interface.py b/interface/interface.py index 7528653..08fd17d 100644 --- a/interface/interface.py +++ b/interface/interface.py @@ -90,6 +90,10 @@ class Interface: todisp.append("Authored by %s, last modified at %s" % (self.w.author, self.w.modified.strftime("%Y-%m-%d %H:%M:%S"))) self.pager.display_many(todisp) + + if not self.output.ok: + self.pager.display_many(("WARNING: Output is not OK!",), True) + self.input.main(self._resize) def handle_show(self, f): @@ -587,6 +591,12 @@ class Interface: return "Step index out of range" self.renderer.advance((n, (p-1) if p is not None else p)) + def current_status(self): + self.pager.display_many(( + "CURRENT STATUS", + "Output is %sOK: %s" % ("" if self.output.ok else "NOT ", self.output.status), + ), True) + def __init__(self, path, output): ## Have to do most of the actual initialization in the main method, as curses isn't ## ready yet. @@ -635,6 +645,8 @@ class Interface: ("list chasers", lambda: self.list_functions(CHASER)), ("list audio", lambda: self.list_functions(AUDIO)), + ("currentstatus", lambda: self.current_status()), + ("pager page", self.page), ("pager clear", self.page_clear), ("quit", self.base_quit), @@ -752,6 +764,8 @@ class Interface: ("advance $num", lambda n: self.run_jump(n, None, False)), ("advance", lambda: self.run_jump(0, None, True)), ("badvance", lambda: self.run_jump(1, None, True)), + + ("currentstatus", self.current_status), )) self.output = output |