mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 18:36:05 +08:00
Add a connection string to the printmonitor
CURA-2091
This commit is contained in:
parent
7011520845
commit
8fbc85dd55
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user