Update messages to use the message_types

CURA-8418
This commit is contained in:
Jaime van Kessel 2021-07-27 11:54:43 +02:00
parent f11079adcf
commit 900db57f0f
No known key found for this signature in database
GPG key ID: 3710727397403C91
23 changed files with 81 additions and 39 deletions

View file

@ -19,7 +19,8 @@ class LegacyDeviceNoLongerSupportedMessage(Message):
"running Ultimaker Connect. Please update the printer to the "
"latest firmware."),
title = I18N_CATALOG.i18nc("@info:title", "Update your printer"),
lifetime = 10
lifetime = 10,
message_type = Message.MessageType.WARNING
)
def show(self) -> None:

View file

@ -29,7 +29,8 @@ class NotClusterHostMessage(Message):
"it as a group host.", device.name),
title = I18N_CATALOG.i18nc("@info:title", "Not a group host"),
lifetime = 0,
dismissable = True
dismissable = True,
message_type = Message.MessageType.ERROR
)
self._address = device.address
self.addAction("", I18N_CATALOG.i18nc("@action", "Configure group"), "", "")

View file

@ -14,5 +14,6 @@ class PrintJobUploadBlockedMessage(Message):
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
lifetime = 10,
message_type = Message.MessageType.WARNING
)

View file

@ -13,5 +13,6 @@ class PrintJobUploadErrorMessage(Message):
def __init__(self, message: str = None) -> None:
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")
title = I18N_CATALOG.i18nc("@info:title", "Network error"),
message_type=Message.MessageType.ERROR
)

View file

@ -15,5 +15,6 @@ class PrintJobUploadQueueFullMessage(Message):
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
lifetime = 10,
message_type=Message.MessageType.WARNING
)

View file

@ -13,5 +13,6 @@ class PrintJobUploadSuccessMessage(Message):
def __init__(self) -> None:
super().__init__(
text = I18N_CATALOG.i18nc("@info:status", "Print job was successfully sent to the printer."),
title = I18N_CATALOG.i18nc("@info:title", "Data Sent")
title = I18N_CATALOG.i18nc("@info:title", "Data Sent"),
message_type = Message.MessageType.POSITIVE
)