mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Merge branch 'master' of github.com:Ultimaker/JediWifiPrintingPlugin
This commit is contained in:
commit
da9cbe9b40
1 changed files with 4 additions and 0 deletions
|
@ -184,10 +184,12 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
def setAuthenticationState(self, auth_state):
|
def setAuthenticationState(self, auth_state):
|
||||||
if auth_state == AuthState.AuthenticationRequested:
|
if auth_state == AuthState.AuthenticationRequested:
|
||||||
self.setAcceptsCommands(False)
|
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_requested_message.show()
|
||||||
self._authentication_timer.start() # Start timer so auth will fail after a while.
|
self._authentication_timer.start() # Start timer so auth will fail after a while.
|
||||||
elif auth_state == AuthState.Authenticated:
|
elif auth_state == AuthState.Authenticated:
|
||||||
self.setAcceptsCommands(True)
|
self.setAcceptsCommands(True)
|
||||||
|
self.setConnectionText(i18n_catalog.i18nc("@info:status", "Connected over the network to {0}.").format(self.name))
|
||||||
self._authentication_requested_message.hide()
|
self._authentication_requested_message.hide()
|
||||||
authentication_succeeded_message = Message(i18n_catalog.i18nc("@info:status", "Printer was successfully paired with Cura"))
|
authentication_succeeded_message = Message(i18n_catalog.i18nc("@info:status", "Printer was successfully paired with Cura"))
|
||||||
authentication_succeeded_message.show()
|
authentication_succeeded_message.show()
|
||||||
|
@ -609,6 +611,8 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice):
|
||||||
if bytes_total > 0:
|
if bytes_total > 0:
|
||||||
new_progress = bytes_sent / bytes_total * 100
|
new_progress = bytes_sent / bytes_total * 100
|
||||||
if new_progress > self._progress_message.getProgress():
|
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)
|
self._progress_message.setProgress(bytes_sent / bytes_total * 100)
|
||||||
else:
|
else:
|
||||||
self._progress_message.setProgress(0)
|
self._progress_message.setProgress(0)
|
||||||
|
self._progress_message.hide()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue