diff --git a/console_conf/controllers/welcome.py b/console_conf/controllers/welcome.py index 868651cc..3d7a7f85 100644 --- a/console_conf/controllers/welcome.py +++ b/console_conf/controllers/welcome.py @@ -21,11 +21,6 @@ from subiquitycore.controller import BaseController class WelcomeController(BaseController): def default(self): - title = "Ubuntu Core" - excerpt = ("Configure the network and setup an administrator " - "account on this all-snap Ubuntu Core system.") - self.ui.set_header(title, excerpt) - self.ui.set_footer("") view = WelcomeView(self) self.ui.set_body(view) diff --git a/console_conf/ui/views/welcome.py b/console_conf/ui/views/welcome.py index 64ee685c..bb16b080 100644 --- a/console_conf/ui/views/welcome.py +++ b/console_conf/ui/views/welcome.py @@ -20,26 +20,25 @@ Welcome provides user with language selection """ import logging -from urwid import Text - -from subiquitycore.ui.buttons import ok_btn -from subiquitycore.ui.container import ListBox, Pile -from subiquitycore.ui.utils import button_pile +from subiquitycore.ui.buttons import done_btn +from subiquitycore.ui.utils import button_pile, screen from subiquitycore.view import BaseView log = logging.getLogger("console_conf.views.welcome") class WelcomeView(BaseView): + title = "Ubuntu Core" + excerpt = ("Configure the network and setup an administrator " + "account on this all-snap Ubuntu Core system.") + def __init__(self, controller): self.controller = controller - super().__init__(Pile([ - # need to have a listbox or something else "stretchy" here or - # urwid complains. - ListBox([Text('')]), - ('pack', button_pile([ok_btn("OK", on_press=self.confirm)])), - ('pack', Text("")), - ], focus_item=1)) + super().__init__(screen( + rows=[], + buttons=button_pile([done_btn("OK", on_press=self.confirm)]), + focus_buttons=True, + excerpt=self.excerpt)) def confirm(self, result): self.controller.done()