Fix install text initialization (#2162)
This commit is contained in:
parent
5e59acf937
commit
7930ea58fd
|
|
@ -211,11 +211,11 @@ class GlobalMenu(AbstractMenu):
|
||||||
return False
|
return False
|
||||||
return self._validate_bootloader() is None
|
return self._validate_bootloader() is None
|
||||||
|
|
||||||
def _update_install_text(self, name: str, value: str):
|
def _update_install_text(self, name: Optional[str] = None, value: Any = None):
|
||||||
text = self._install_text()
|
text = self._install_text()
|
||||||
self._menu_options['install'].update_description(text)
|
self._menu_options['install'].update_description(text)
|
||||||
|
|
||||||
def post_callback(self, name: str, value: str):
|
def post_callback(self, name: Optional[str] = None, value: Any = None):
|
||||||
self._update_install_text(name, value)
|
self._update_install_text(name, value)
|
||||||
|
|
||||||
def _install_text(self):
|
def _install_text(self):
|
||||||
|
|
|
||||||
|
|
@ -252,7 +252,7 @@ class AbstractMenu:
|
||||||
""" will be called before each action in the menu """
|
""" will be called before each action in the menu """
|
||||||
return
|
return
|
||||||
|
|
||||||
def post_callback(self, selection_name: str, value: Any):
|
def post_callback(self, selection_name: Optional[str] = None, value: Any = None):
|
||||||
""" will be called after each action in the menu """
|
""" will be called after each action in the menu """
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
@ -299,6 +299,7 @@ class AbstractMenu:
|
||||||
|
|
||||||
def run(self, allow_reset: bool = False):
|
def run(self, allow_reset: bool = False):
|
||||||
self._sync_all()
|
self._sync_all()
|
||||||
|
self.post_callback()
|
||||||
cursor_pos = None
|
cursor_pos = None
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue