Made setAcceptsCommands protected

CL-541
This commit is contained in:
Jaime van Kessel 2017-12-14 09:36:31 +01:00
parent 005ba4ac53
commit 80526893c2
2 changed files with 3 additions and 3 deletions

View file

@ -138,7 +138,7 @@ class PrinterOutputDevice(QObject, OutputDevice):
return self._accepts_commands return self._accepts_commands
## Set a flag to signal the UI that the printer is not (yet) ready to receive commands ## Set a flag to signal the UI that the printer is not (yet) ready to receive commands
def setAcceptsCommands(self, accepts_commands): def _setAcceptsCommands(self, accepts_commands):
if self._accepts_commands != accepts_commands: if self._accepts_commands != accepts_commands:
self._accepts_commands = accepts_commands self._accepts_commands = accepts_commands

View file

@ -79,9 +79,9 @@ class LegacyUM3OutputDevice(NetworkedPrinterOutputDevice):
def _onAuthenticationStateChanged(self): def _onAuthenticationStateChanged(self):
# We only accept commands if we are authenticated. # We only accept commands if we are authenticated.
if self._authentication_state == AuthState.Authenticated: if self._authentication_state == AuthState.Authenticated:
self.setAcceptsCommands(True) self._setAcceptsCommands(True)
else: else:
self.setAcceptsCommands(False) self._setAcceptsCommands(False)
def _setupMessages(self): def _setupMessages(self):
self._authentication_requested_message = Message(i18n_catalog.i18nc("@info:status", self._authentication_requested_message = Message(i18n_catalog.i18nc("@info:status",