mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 15:13:56 -06:00
Update messages to use the message_types
CURA-8418
This commit is contained in:
parent
f11079adcf
commit
900db57f0f
23 changed files with 81 additions and 39 deletions
|
@ -119,7 +119,7 @@ class Backup:
|
|||
def _showMessage(self, message: str) -> None:
|
||||
"""Show a UI message."""
|
||||
|
||||
Message(message, title=self.catalog.i18nc("@info:title", "Backup"), lifetime=30).show()
|
||||
Message(message, title=self.catalog.i18nc("@info:title", "Backup")).show()
|
||||
|
||||
def restore(self) -> bool:
|
||||
"""Restore this back-up.
|
||||
|
@ -154,7 +154,10 @@ class Backup:
|
|||
archive = ZipFile(io.BytesIO(self.zip_file), "r")
|
||||
except LookupError as e:
|
||||
Logger.log("d", f"The following error occurred while trying to restore a Cura backup: {str(e)}")
|
||||
self._showMessage(self.catalog.i18nc("@info:backup_failed", "The following error occurred while trying to restore a Cura backup:") + str(e))
|
||||
Message(self.catalog.i18nc("@info:backup_failed", "The following error occurred while trying to restore a Cura backup:") + str(e),
|
||||
title = self.catalog.i18nc("@info:title", "Backup"),
|
||||
message_type = Message.MessageType.ERROR).show()
|
||||
|
||||
return False
|
||||
extracted = self._extractArchive(archive, version_data_dir)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue