Refactor removal warning message to CloudOutputDeviceManager

CURA-7436
This commit is contained in:
Nino van Hooff 2020-05-18 16:22:55 +02:00
parent c61f5a162e
commit 252b993169
3 changed files with 21 additions and 11 deletions

View file

@ -265,6 +265,12 @@ class CloudOutputDeviceManager:
machine.setName(device.name)
machine.setMetaDataEntry(self.META_CLUSTER_ID, device.key)
machine.setMetaDataEntry("group_name", device.name)
machine.setMetaDataEntry("removal_warning", self.I18N_CATALOG.i18nc(
"@label ({} is printer name)",
"{} will be removed but will be added again in the next sync. To remove the printer permanently, "
"visit <a href='https://mycloud.ultimaker.com/'>Ultimaker Digital Factory</a>",
device.name
))
machine.addConfiguredConnectionType(device.connectionType.value)
def _connectToOutputDevice(self, device: CloudOutputDevice, machine: GlobalStack) -> None: