On Fri, 2015-07-03 at 13:38 +0200, Martin Kolman wrote:
Otherwise it is not readily apparent that the user needs to press 1 to enter the single visible spoke.
This is currently most relevant for Initial Setup which shows only the EULA spoke if user has already been created during the installation.
Resolves: rhbz#1199234 Signed-off-by: Martin Kolman mkolman@redhat.com
pyanaconda/ui/tui/hubs/__init__.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+)
diff --git a/pyanaconda/ui/tui/hubs/__init__.py b/pyanaconda/ui/tui/hubs/__init__.py index e89bf71..525b68e 100644 --- a/pyanaconda/ui/tui/hubs/__init__.py +++ b/pyanaconda/ui/tui/hubs/__init__.py @@ -114,3 +114,22 @@ class TUIHub(TUIObject, common.Hub): print(_("Please complete all spokes before continuing")) return False return key
- def prompt(self, args=None):
"""Show an alternative prompt if the hub contains only onespoke.
Otherwise it is not readily apparent that the user needs topress
1 to enter the single visible spoke.:param args: optional argument passed from switch_screencalls
:type args: anything:return: returns text to be shown next to the prompt forinput or None
to skip further input processing:rtype: str|None"""if self._spoke_count == 1:single_spoke_title = self._spokes.values()[0].titlereturn _(u" Please make your choice from [ '1' to enterthe %s spoke | 'q' to quit |\n"
" 'c' to continue | 'r' to refresh]: " %single_spoke_title)
else:return super(TUIHub, self).prompt(args)
Ack.