remove all remaining footer-related things

This commit is contained in:
Michael Hudson-Doyle 2019-09-25 13:37:15 +12:00
parent a96c5c8805
commit a2ccb0cd9e
14 changed files with 4 additions and 55 deletions

View File

@ -82,19 +82,10 @@ A subiquity screen consists of:
2. a scrollable content area
3. a stack of buttons, including "done"/"cancel" buttons for moving between
screens
3. a footer
The header has a summary line describing the current screen against an "ubuntu
orange" background.
The footer has a progress bar indicating how far through the install process
the user was, a blank line and the summary area. Currently the summary area
contains static content for the first few screens, but there are vague plans to
make it specific to the currently focused element. Once the install has started
but before we get to the final screen, the summary area contains a summary of
progress made by the installation. Someday soon the summary area will also
contain a button that allows you to drop to a shell at any point.
The body area is where most of the action is. It follows a standard pattern
described above, and the `subiquitycore.ui.utils.screen()` function makes it
very easy to follow that pattern. Many screen have "sub-dialogs" (think:

View File

@ -199,8 +199,6 @@ class IdentityController(BaseController):
self.model = app.base_model.identity
def start_ui(self):
footer = ""
self.ui.set_footer(footer)
self.ui.set_body(IdentityView(self.model, self))
device_owner = get_device_owner()
if device_owner is not None:
@ -221,11 +219,9 @@ class IdentityController(BaseController):
self.model.add_user(result)
login_details_path = '.subiquity/login-details.txt'
else:
self.ui.set_footer("Contacting store...")
self.loop.draw_screen()
cp = run_command(
["snap", "create-user", "--sudoer", "--json", email])
self.ui.set_footer("")
if cp.returncode != 0:
self.ui.body.error.set_text(
"Creating user failed:\n" + cp.stderr)
@ -254,9 +250,7 @@ class IdentityController(BaseController):
def login(self):
title = "Configuration Complete"
footer = "View configured user and device access methods"
self.ui.set_header(title)
self.ui.set_footer(footer)
net_model = self.app.controller_instances['Network'].model
ifaces = net_model.get_all_netdevs()

View File

@ -28,7 +28,6 @@ COLORS = [
STYLES = [
('frame_header', 'fg', 'orange'),
('frame_footer', 'fg', 'brand'),
('body', 'fg', 'bg'),
('done_button', 'fg', 'bg'),
@ -56,7 +55,6 @@ STYLES = [
STYLES_MONO = [
('frame_header', 'white', 'black'),
('frame_footer', 'white', 'black'),
('body', 'white', 'black'),
('done_button', 'white', 'black'),

View File

@ -269,15 +269,14 @@ class InstallProgressController(BaseController):
def _install_event_start(self, message):
log.debug("_install_event_start %s", message)
self.footer_description.set_text(message)
self.progress_view.add_event(self._event_indent + message)
self._event_indent += " "
self.footer_spinner.start()
self.progress_view.spinner.start()
def _install_event_finish(self):
self._event_indent = self._event_indent[:-2]
log.debug("_install_event_finish %r", self._event_indent)
self.footer_spinner.stop()
self.progress_view.spinner.stop()
def curtin_event(self, event):
e = {}
@ -340,15 +339,7 @@ class InstallProgressController(BaseController):
def curtin_start_install(self):
log.debug('curtin_start_install')
self.install_state = InstallState.RUNNING
self.footer_description = urwid.Text(_("starting..."))
self.progress_view = ProgressView(self)
self.footer_spinner = self.progress_view.spinner
self.ui.auto_footer = False
self.ui.set_footer(urwid.Columns(
[('pack', urwid.Text(_("Install in progress:"))),
(self.footer_description),
('pack', self.footer_spinner)], dividechars=1))
self.journal_listener_handle = self.start_journald_listener(
[self._event_syslog_identifier, self._log_syslog_identifier],
@ -369,12 +360,6 @@ class InstallProgressController(BaseController):
return
self.install_state = InstallState.DONE
log.debug('After curtin install OK')
self.ui.progress_current += 1
if not self.showing:
self.ui.set_footer(_("Install complete"))
else:
# Re-set footer so progress bar updates.
self.ui.set_footer(_("Thank you for using Ubuntu!"))
self._step_done('install')
def cancel(self):
@ -564,16 +549,12 @@ class InstallProgressController(BaseController):
def start_ui(self):
if self.install_state == InstallState.RUNNING:
self.progress_view.title = _("Installing system")
footer = _("Thank you for using Ubuntu!")
elif self.install_state == InstallState.DONE:
self.progress_view.title = _("Install complete!")
footer = _("Thank you for using Ubuntu!")
elif self.install_state == InstallState.ERROR:
self.progress_view.title = (
_('An error occurred during installation'))
footer = _('Please report this error in Launchpad')
self.ui.set_body(self.progress_view)
self.ui.set_footer(footer)
uu_apt_conf = """\

View File

@ -38,7 +38,6 @@ COLORS = [
STYLES = [
('frame_header_fringe', 'orange', 'bg'),
('frame_header', 'fg', 'orange'),
('frame_footer', 'fg', 'brand'),
('body', 'fg', 'bg'),
('done_button', 'fg', 'bg'),
@ -71,8 +70,8 @@ STYLES = [
STYLES_MONO = [
('frame_header_fringe', 'black', 'white'),
('frame_header', 'white', 'black'),
('frame_footer', 'white', 'black'),
('body', 'white', 'black'),
('done_button', 'white', 'black'),

View File

@ -433,7 +433,6 @@ class DeviceList(WidgetWrap):
class FilesystemView(BaseView):
title = _("Filesystem setup")
footer = _("Select available disks to format and mount")
def __init__(self, model, controller):
self.model = model

View File

@ -59,7 +59,6 @@ review and modify the results.""")
class GuidedFilesystemView(BaseView):
title = _("Filesystem setup")
footer = _("Choose guided or manual partitioning")
def __init__(self, controller):
self.controller = controller
@ -111,7 +110,6 @@ def _wrap_button_row(row):
class GuidedDiskSelectionView(BaseView):
title = _("Filesystem setup")
footer = (_("Choose the installation target"))
def __init__(self, model, controller, method):
self.model = model

View File

@ -385,7 +385,6 @@ class KeyboardForm(Form):
class KeyboardView(BaseView):
title = _("Keyboard configuration")
footer = _("Use UP, DOWN and ENTER keys to select your keyboard.")
def __init__(self, model, controller, opts):
self.model = model

View File

@ -30,7 +30,6 @@ log = logging.getLogger("subiquity.views.welcome")
class WelcomeView(BaseView):
title = "Willkommen! Bienvenue! Welcome! Добро пожаловать! Welkom!"
footer = _("Use UP, DOWN and ENTER keys to select your language.")
def __init__(self, model, controller):
self.model = model
@ -39,7 +38,7 @@ class WelcomeView(BaseView):
self._build_model_inputs(),
buttons=None,
narrow_rows=True,
excerpt=_("Please choose your preferred language.")))
excerpt=_("Use UP, DOWN and ENTER keys to select your language.")))
def _build_model_inputs(self):
btns = []

View File

@ -127,7 +127,6 @@ class ZdevList(WidgetWrap):
class ZdevView(BaseView):
title = _("Zdev setup")
footer = _("Activate and configure Z devices")
def __init__(self, controller):
log.debug('FileSystemView init start()')

View File

@ -50,9 +50,6 @@ class SubiquityCoreUI(WidgetWrap):
def set_header(self, title=None):
self._assign_contents(0, Header(title, self.right_icon))
def set_footer(self, message):
pass
@property
def body(self):
return self.pile.contents[1][0]

View File

@ -151,7 +151,6 @@ STYLE_NAMES = set([
'danger_button',
'done_button focus',
'done_button',
'frame_footer',
'frame_header',
'frame_header_fringe',
'info_error',

View File

@ -75,8 +75,6 @@ class NetworkView(BaseView):
excerpt = _("Configure at least one interface this server can use to talk "
"to other machines, and which preferably provides sufficient "
"access for updates.")
footer = _("Select an interface to configure it or select Done to "
"continue")
def __init__(self, model, controller):
self.model = model

View File

@ -35,8 +35,6 @@ from subiquitycore.ui.utils import disabled
class BaseView(WidgetWrap):
footer = ""
def show_overlay(self, overlay_widget, **kw):
args = dict(
align='center',