The InstallerWindow needs to handle errors differently once the installation has begun.

In that case, we show no ErrorDialog but instead an error message page, which does not allow you to go back.
This commit is contained in:
Daniel Johnson 2023-12-16 05:18:47 -05:00 committed by Mathieu Comandon
parent b50a4bcb97
commit a6cc3ce995

View file

@ -255,12 +255,17 @@ class InstallerWindow(ModelessDialog,
)
def on_signal_error(self, error):
ErrorDialog(error, parent=self)
self.stack.navigation_reset()
self._handle_callback_error(error)
def on_idle_error(self, error):
ErrorDialog(error, parent=self)
self.stack.navigation_reset()
self._handle_callback_error(error)
def _handle_callback_error(self, error):
if self.install_in_progress:
self.load_error_message_page(str(error))
else:
ErrorDialog(error, parent=self)
self.stack.navigation_reset()
def set_status(self, text):
"""Display a short status text."""