From 1a456253a01748950cb891cc7e74c05ad8624d07 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Fri, 9 Dec 2016 17:16:59 +0100 Subject: [PATCH] Added not supported message to USB printing if it's not supported --- plugins/USBPrinting/USBPrinterOutputDevice.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/USBPrinting/USBPrinterOutputDevice.py b/plugins/USBPrinting/USBPrinterOutputDevice.py index 7d8a11521d..e411bbe514 100644 --- a/plugins/USBPrinting/USBPrinterOutputDevice.py +++ b/plugins/USBPrinting/USBPrinterOutputDevice.py @@ -433,6 +433,13 @@ class USBPrinterOutputDevice(PrinterOutputDevice): # \param filter_by_machine Whether to filter MIME types by machine. This # is ignored. def requestWrite(self, nodes, file_name = None, filter_by_machine = False, file_handler = None): + container_stack = Application.getInstance().getGlobalContainerStack() + if container_stack.getProperty("machine_gcode_flavor", "value") == "UltiGCode" or not container_stack.getMetaDataEntry("supports_usb_connection"): + self._error_message = Message(catalog.i18nc("@info:status", + "Unable to start a new job because the printer does not support usb printing.")) + self._error_message.show() + return + Application.getInstance().showPrintMonitor.emit(True) self.startPrint()