From 8fbc85dd558e655b64b3d270500ca499f74fe6bb Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 9 Aug 2016 18:44:14 +0200 Subject: [PATCH 1/2] Add a connection string to the printmonitor CURA-2091 --- NetworkPrinterOutputDevice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index 60188921f8..feaa71e393 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -182,10 +182,12 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): def setAuthenticationState(self, auth_state): if auth_state == AuthState.AuthenticationRequested: self.setAcceptsCommands(False) + self.setConnectionText(i18n_catalog.i18nc("@info:status", "Connected over the network to {0} without access to control the printer.").format(self.name)) self._authentication_requested_message.show() self._authentication_timer.start() # Start timer so auth will fail after a while. elif auth_state == AuthState.Authenticated: self.setAcceptsCommands(True) + self.setConnectionText(i18n_catalog.i18nc("@info:status", "Connected over the network to {0}.").format(self.name)) self._authentication_requested_message.hide() authentication_succeeded_message = Message(i18n_catalog.i18nc("@info:status", "Printer was successfully paired with Cura")) authentication_succeeded_message.show() From bd7e8e4c52bbc41eb5306648140b40ff4c97159f Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 10 Aug 2016 10:46:02 +0200 Subject: [PATCH 2/2] Progress is now hidden when connection is lost CURA-1851 --- NetworkPrinterOutputDevice.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index feaa71e393..cfcc5affc3 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -608,6 +608,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): if bytes_total > 0: new_progress = bytes_sent / bytes_total * 100 if new_progress > self._progress_message.getProgress(): + self._progress_message.show() # Ensure that the message is visible. self._progress_message.setProgress(bytes_sent / bytes_total * 100) else: self._progress_message.setProgress(0) + self._progress_message.hide()