mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -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
|
@ -73,6 +73,7 @@ class DFFileExportAndUploadManager:
|
|||
text = "Your {} uploaded to '{}'.".format("file was" if len(self._file_upload_job_metadata) <= 1 else "files were", self._library_project_name),
|
||||
title = "Upload successful",
|
||||
lifetime = 0,
|
||||
message_type=Message.MessageType.POSITIVE
|
||||
)
|
||||
self._generic_success_message.addAction(
|
||||
"open_df_project",
|
||||
|
@ -81,8 +82,6 @@ class DFFileExportAndUploadManager:
|
|||
)
|
||||
self._generic_success_message.actionTriggered.connect(self._onMessageActionTriggered)
|
||||
|
||||
|
||||
|
||||
def _onCuraProjectFileExported(self, job: ExportFileJob) -> None:
|
||||
"""Handler for when the DF Library workspace file (3MF) has been created locally.
|
||||
|
||||
|
|
|
@ -530,7 +530,8 @@ class DigitalFactoryController(QObject):
|
|||
Message(
|
||||
text = "Failed to write to temporary file for '{}'.".format(file_name),
|
||||
title = "File-system error",
|
||||
lifetime = 10
|
||||
lifetime = 10,
|
||||
message_type=Message.MessageType.ERROR
|
||||
).show()
|
||||
return
|
||||
|
||||
|
@ -544,7 +545,8 @@ class DigitalFactoryController(QObject):
|
|||
Message(
|
||||
text = "Failed Digital Library download for '{}'.".format(f),
|
||||
title = "Network error {}".format(error),
|
||||
lifetime = 10
|
||||
lifetime = 10,
|
||||
message_type=Message.MessageType.ERROR
|
||||
).show()
|
||||
|
||||
download_manager = HttpRequestManager.getInstance()
|
||||
|
@ -589,7 +591,10 @@ class DigitalFactoryController(QObject):
|
|||
|
||||
if filename == "":
|
||||
Logger.log("w", "The file name cannot be empty.")
|
||||
Message(text = "Cannot upload file with an empty name to the Digital Library", title = "Empty file name provided", lifetime = 0).show()
|
||||
Message(text = "Cannot upload file with an empty name to the Digital Library",
|
||||
title = "Empty file name provided",
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.ERROR).show()
|
||||
return
|
||||
|
||||
self._saveFileToSelectedProjectHelper(filename, formats)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue