From: Michael Tremer Date: Wed, 5 May 2021 22:16:58 +0000 (+0000) Subject: Improve helpline with information about test/unattended mode X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0e2883db119fad4ed945d0a3b01a09fe0453fb4c;p=people%2Fms%2Fbricklayer.git Improve helpline with information about test/unattended mode Signed-off-by: Michael Tremer --- diff --git a/src/python/tui/__init__.py b/src/python/tui/__init__.py index 092f041..6e973eb 100644 --- a/src/python/tui/__init__.py +++ b/src/python/tui/__init__.py @@ -66,9 +66,20 @@ class Tui(object): self.draw_root_text("%(PRETTY_NAME)s" % self.bricklayer.os) # Setup helpline - self.push_helpline( - _("/ between elements | selects | next screen") - ) + helpline = [] + + if self.bricklayer.test: + helpline.append(_("Test Mode Enabled")) + + # Show key commands only when they are useful + if not self.bricklayer.unattended: + helpline += ( + _("/ between elements"), + _(" selects"), + _(" next screen"), + ) + + self.push_helpline(" | ".join(helpline)) # Refresh the screen self.refresh()