Use image instead of custom message type

CURA-8601
This commit is contained in:
Jaime van Kessel 2021-10-05 10:20:52 +02:00
parent dc7a45eacf
commit 527de2b6ef
3 changed files with 359 additions and 3 deletions

View file

@ -16,12 +16,15 @@ I18N_CATALOG = i18nCatalog("cura")
class CloudFlowMessage(Message):
def __init__(self, printer_name: str) -> None:
image_path = os.path.join(
CuraApplication.getInstance().getPluginRegistry().getPluginPath("UM3NetworkPrinting") or "",
"resources", "svg", "CloudPlatform.svg"
)
super().__init__(
text=I18N_CATALOG.i18nc("@info:status",
f"Your printer <b>{printer_name}</b> could be connected via cloud.\n Manage your print queue and monitor your prints from anywhere connecting your printer to Digital Factory"),
title=I18N_CATALOG.i18nc("@info:title", "Are you ready for cloud printing?"),
message_type=Message.MessageType.CLOUD
image_source=QUrl.fromLocalFile(image_path)
)
self._printer_name = printer_name
self.addAction("get_started", I18N_CATALOG.i18nc("@action", "Get started"), "", "")