mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
Updated message with message types
Contributes to CURA-8418
This commit is contained in:
parent
900db57f0f
commit
2263969d5f
26 changed files with 136 additions and 82 deletions
|
@ -73,7 +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
|
||||
message_type = Message.MessageType.POSITIVE
|
||||
)
|
||||
self._generic_success_message.addAction(
|
||||
"open_df_project",
|
||||
|
@ -220,7 +220,8 @@ class DFFileExportAndUploadManager:
|
|||
self._file_upload_job_metadata[filename]["file_upload_failed_message"] = Message(
|
||||
text = "Failed to export the file '{}'. The upload process is aborted.".format(filename),
|
||||
title = "Export error",
|
||||
lifetime = 0
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.ERROR
|
||||
)
|
||||
self._on_upload_error()
|
||||
self._onFileUploadFinished(filename)
|
||||
|
@ -242,7 +243,8 @@ class DFFileExportAndUploadManager:
|
|||
self._file_upload_job_metadata[filename_3mf]["file_upload_failed_message"] = Message(
|
||||
text = "Failed to upload the file '{}' to '{}'. {}".format(filename_3mf, self._library_project_name, human_readable_error),
|
||||
title = "File upload error",
|
||||
lifetime = 0
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.ERROR
|
||||
)
|
||||
self._on_upload_error()
|
||||
self._onFileUploadFinished(filename_3mf)
|
||||
|
@ -264,7 +266,8 @@ class DFFileExportAndUploadManager:
|
|||
self._file_upload_job_metadata[filename_ufp]["file_upload_failed_message"] = Message(
|
||||
title = "File upload error",
|
||||
text = "Failed to upload the file '{}' to '{}'. {}".format(filename_ufp, self._library_project_name, human_readable_error),
|
||||
lifetime = 0
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.ERROR
|
||||
)
|
||||
self._on_upload_error()
|
||||
self._onFileUploadFinished(filename_ufp)
|
||||
|
@ -300,7 +303,8 @@ class DFFileExportAndUploadManager:
|
|||
self._file_upload_job_metadata[filename]["file_upload_failed_message"] = Message(
|
||||
title = "File upload error",
|
||||
text = "Failed to upload the file '{}' to '{}'. {}".format(self._file_name, self._library_project_name, human_readable_error),
|
||||
lifetime = 0
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.ERROR
|
||||
)
|
||||
|
||||
self._on_upload_error()
|
||||
|
@ -337,11 +341,13 @@ class DFFileExportAndUploadManager:
|
|||
text = "'{}' was uploaded to '{}'.".format(filename_3mf, self._library_project_name),
|
||||
title = "Upload successful",
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.POSITIVE
|
||||
),
|
||||
"file_upload_failed_message": Message(
|
||||
text = "Failed to upload the file '{}' to '{}'.".format(filename_3mf, self._library_project_name),
|
||||
title = "File upload error",
|
||||
lifetime = 0
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.ERROR
|
||||
)
|
||||
}
|
||||
job_3mf = ExportFileJob(self._file_handlers["3mf"], self._nodes, self._file_name, "3mf")
|
||||
|
@ -359,11 +365,13 @@ class DFFileExportAndUploadManager:
|
|||
text = "'{}' was uploaded to '{}'.".format(filename_ufp, self._library_project_name),
|
||||
title = "Upload successful",
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.POSITIVE
|
||||
),
|
||||
"file_upload_failed_message": Message(
|
||||
text = "Failed to upload the file '{}' to '{}'.".format(filename_ufp, self._library_project_name),
|
||||
title = "File upload error",
|
||||
lifetime = 0
|
||||
lifetime = 0,
|
||||
message_type = Message.MessageType.ERROR
|
||||
)
|
||||
}
|
||||
job_ufp = ExportFileJob(self._file_handlers["ufp"], self._nodes, self._file_name, "ufp")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue