Warning message is shown if the printer is still active.

CURA-49
This commit is contained in:
Jaime van Kessel 2016-04-19 12:10:53 +02:00
parent 2034aeb5c1
commit 1a44c394e1

View file

@ -108,6 +108,10 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
pass #Do Nothing pass #Do Nothing
def startPrint(self): def startPrint(self):
if self._progress != 0:
self._error_message = Message(i18n_catalog.i18nc("@info:status", "Printer is still printing. Unable to start a new job."))
self._error_message.show()
return
try: try:
self._progress_message = Message(i18n_catalog.i18nc("@info:status", "Sending data to printer"), 0, False, -1) self._progress_message = Message(i18n_catalog.i18nc("@info:status", "Sending data to printer"), 0, False, -1)
self._progress_message.show() self._progress_message.show()
@ -118,7 +122,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
pass pass
except IOError: except IOError:
self._progress_message.hide() self._progress_message.hide()
self._error_message = Message(i18n_catalog.i18nc("@info:status", "Unable to send data printer. Is another job still active?")) self._error_message = Message(i18n_catalog.i18nc("@info:status", "Unable to send data to printer. Is another job still active?"))
self._error_message.show() self._error_message.show()
except Exception as e: except Exception as e:
self._progress_message.hide() self._progress_message.hide()