Merge pull request #1586 from ogayot/done-function-or-button

filesystem: rename done btn which overrides a meth. of the same name
This commit is contained in:
Olivier Gayot 2023-03-17 17:21:09 +01:00 committed by GitHub
commit 2fc55b4363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -241,7 +241,7 @@ class FilesystemController(SubiquityTuiController, FilesystemManipulator):
clean_suffix='vg'):
pass
elif action['action'] == 'done':
if not self.ui.body.done.enabled:
if not self.ui.body.done_btn.enabled:
raise Exception("answers did not provide complete fs config")
await self.app.confirm_install()
self.finish()

View File

@ -495,10 +495,10 @@ class FilesystemView(BaseView):
return TablePile(rows)
def _build_buttons(self):
self.done = Toggleable(done_btn(_("Done"), on_press=self.done))
self.done_btn = Toggleable(done_btn(_("Done"), on_press=self.done))
return [
self.done,
self.done_btn,
reset_btn(_("Reset"), on_press=self.reset),
back_btn(_("Back"), on_press=self.cancel),
]
@ -524,7 +524,7 @@ class FilesystemView(BaseView):
# This is an awful hack, actual thinking required:
self.lb.base_widget._select_first_selectable()
can_install = self.model.can_install()
self.done.enabled = can_install
self.done_btn.enabled = can_install
if self.showing_guidance:
del self.frame.contents[0]
guidance = self._guidance()