Applied review comments

Contributes to CURA-8418
This commit is contained in:
jelle Spijker 2021-07-28 11:32:29 +02:00 committed by Jelle Spijker
parent 2e6a488c98
commit b6665f1142
No known key found for this signature in database
GPG key ID: 6662DC033BE6B99A
11 changed files with 12 additions and 15 deletions

View file

@ -14,7 +14,7 @@ class LegacyDeviceNoLongerSupportedMessage(Message):
"""Singleton used to prevent duplicate messages of this type at the same time."""
def __init__(self) -> None:
super(LegacyDeviceNoLongerSupportedMessage, self).__init__(
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "You are attempting to connect to a printer that is not "
"running Ultimaker Connect. Please update the printer to the "
"latest firmware."),

View file

@ -20,14 +20,12 @@ class MaterialSyncMessage(Message):
"""Singleton used to prevent duplicate messages of this type at the same time."""
def __init__(self, device: "UltimakerNetworkedPrinterOutputDevice") -> None:
super(MaterialSyncMessage, self).__init__(
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "Cura has detected material profiles that were not yet installed "
"on the host printer of group {0}.", device.name),
title = I18N_CATALOG.i18nc("@info:title", "Sending materials to printer"),
lifetime = 10,
dismissable = True,
message_type = Message.MessageType.POSITIVE
)
dismissable = True)
def show(self) -> None:
if MaterialSyncMessage.__is_visible:

View file

@ -23,7 +23,7 @@ class NotClusterHostMessage(Message):
"""Singleton used to prevent duplicate messages of this type at the same time."""
def __init__(self, device: "UltimakerNetworkedPrinterOutputDevice") -> None:
super(NotClusterHostMessage, self).__init__(
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "You are attempting to connect to {0} but it is not "
"the host of a group. You can visit the web page to configure "
"it as a group host.", device.name),

View file

@ -11,7 +11,7 @@ class PrintJobUploadBlockedMessage(Message):
"""Message shown when uploading a print job to a cluster is blocked because another upload is already in progress."""
def __init__(self) -> None:
super(PrintJobUploadBlockedMessage, self).__init__(
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "Please wait until the current job has been sent."),
title = I18N_CATALOG.i18nc("@info:title", "Print error"),
lifetime = 10,

View file

@ -11,7 +11,7 @@ class PrintJobUploadErrorMessage(Message):
"""Message shown when uploading a print job to a cluster failed."""
def __init__(self, message: str = None) -> None:
super(PrintJobUploadErrorMessage, self).__init__(
super().__init__(
text = message or I18N_CATALOG.i18nc("@info:text", "Could not upload the data to the printer."),
title = I18N_CATALOG.i18nc("@info:title", "Network error"),
message_type=Message.MessageType.ERROR

View file

@ -11,7 +11,7 @@ class PrintJobUploadProgressMessage(Message):
"""Class responsible for showing a progress message while a mesh is being uploaded to the cloud."""
def __init__(self):
super(PrintJobUploadProgressMessage, self).__init__(
super().__init__(
title = I18N_CATALOG.i18nc("@info:status", "Sending Print Job"),
text = I18N_CATALOG.i18nc("@info:status", "Uploading print job to printer."),
progress = -1,

View file

@ -12,7 +12,7 @@ class PrintJobUploadQueueFullMessage(Message):
"""Message shown when uploading a print job to a cluster and the print queue is full."""
def __init__(self) -> None:
super(PrintJobUploadQueueFullMessage, self).__init__(
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "Print job queue is full. The printer can't accept a new job."),
title = I18N_CATALOG.i18nc("@info:title", "Queue Full"),
lifetime = 10,

View file

@ -11,7 +11,7 @@ class PrintJobUploadSuccessMessage(Message):
"""Message shown when uploading a print job to a cluster succeeded."""
def __init__(self) -> None:
super(PrintJobUploadSuccessMessage, self).__init__(
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "Print job was successfully sent to the printer."),
title = I18N_CATALOG.i18nc("@info:title", "Data Sent"),
message_type = Message.MessageType.POSITIVE