From 1ce6c3a4f1737d26f0f9fb269168cea6b8d0ea1c Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 13 Sep 2016 10:53:41 +0200 Subject: [PATCH 1/4] Added defaults to requestAcces Cura-2277 --- NetworkPrinterOutputDevice.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NetworkPrinterOutputDevice.py b/NetworkPrinterOutputDevice.py index 239076383d..921a704d46 100644 --- a/NetworkPrinterOutputDevice.py +++ b/NetworkPrinterOutputDevice.py @@ -245,7 +245,7 @@ class NetworkPrinterOutputDevice(PrinterOutputDevice): self._authentication_state = auth_state @pyqtSlot() - def requestAuthentication(self, message_id, action_id): + def requestAuthentication(self, message_id = None, action_id = "Retry"): if action_id == "Request" or action_id == "Retry": self._authentication_failed_message.hide() self._not_authenticated_message.hide() From a266a4026c4ee193564dd61aa0e79cadc07e2026 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 13 Sep 2016 11:02:45 +0200 Subject: [PATCH 2/4] Added explicit enabled property so connect button actually reacts to clicks CURA-2277 --- UM3InfoComponents.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/UM3InfoComponents.qml b/UM3InfoComponents.qml index 0106c8cffa..4ce4cc0f92 100644 --- a/UM3InfoComponents.qml +++ b/UM3InfoComponents.qml @@ -37,6 +37,7 @@ Item text: catalog.i18nc("@action:button", "Connect") style: UM.Theme.styles.sidebar_action_button onClicked: connectActionDialog.show() + enabled: true visible: !base.printerConnected } } From 5c4f79eab3804cb1c0c1565e4a0d80db3aaa39e1 Mon Sep 17 00:00:00 2001 From: fieldOfView Date: Tue, 13 Sep 2016 11:03:51 +0200 Subject: [PATCH 3/4] Add stub button to sync configuration from printer to Cura inb4 string-freeze CURA-2276 --- UM3InfoComponents.qml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/UM3InfoComponents.qml b/UM3InfoComponents.qml index 0106c8cffa..c51b33e688 100644 --- a/UM3InfoComponents.qml +++ b/UM3InfoComponents.qml @@ -64,12 +64,18 @@ Item visible: isUM3 Button { - height: UM.Theme.getSize("save_button_save_to_button").height tooltip: catalog.i18nc("@info:tooltip", "Send access request to the printer") text: catalog.i18nc("@action:button", "Request Access") onClicked: Cura.MachineManager.printerOutputDevices[0].requestAuthentication() visible: base.printerConnected && !base.printerAcceptsCommands } + + Button + { + tooltip: catalog.i18nc("@info:tooltip", "Load the configuration of the printer into Cura") + text: catalog.i18nc("@action:button", "Activate Configuration") + visible: false + } } UM.I18nCatalog{id: catalog; name:"cura"} From cb05bbadd0b037e23ee3d91a966eeb0d7d3f2ce7 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Tue, 13 Sep 2016 11:05:09 +0200 Subject: [PATCH 4/4] Explicitly set it to bool to prevent warnings --- DiscoverUM3Action.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DiscoverUM3Action.qml b/DiscoverUM3Action.qml index a33ddd31fe..c98bb13334 100644 --- a/DiscoverUM3Action.qml +++ b/DiscoverUM3Action.qml @@ -165,7 +165,7 @@ Cura.MachineAction Column { width: parent.width * 0.5 - visible: base.selectedPrinter + visible: base.selectedPrinter ? true : false spacing: UM.Theme.getSize("default_margin").height Label { @@ -220,7 +220,7 @@ Cura.MachineAction Button { text: catalog.i18nc("@action:button", "Connect") - enabled: base.selectedPrinter + enabled: base.selectedPrinter ? true : false onClicked: connectToPrinter() } }