From 4ca8bc5a9eb7b5874d9fa9d584e3d6bea49a4237 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 28 Sep 2017 11:21:17 +0200 Subject: [PATCH 1/5] CL-118 Add support and text for disabled printers and print jobs which require config changes. --- .../UM3NetworkPrinting/PrinterInfoBlock.qml | 47 +++++++++++++------ 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml index bab7db41d4..c83865f8b1 100644 --- a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml @@ -199,10 +199,10 @@ Rectangle property var showExtended: { if(printJob!= null) { - var extendStates = ["sent_to_printer", "wait_for_configuration", "printing", "pre_print", "post_print", "wait_cleanup"]; + var extendStates = ["sent_to_printer", "wait_for_configuration", "printing", "pre_print", "post_print", "wait_cleanup", "queued"]; return extendStates.indexOf(printJob.status) !== -1; } - return false + return ! printer.enabled; } visible: { @@ -227,6 +227,11 @@ Rectangle anchors.right: progressText.left anchors.rightMargin: UM.Theme.getSize("default_margin").width text: { + if ( ! printer.enabled) + { + return catalog.i18nc("@label:status", "Disabled"); + } + if(printJob != null) { if(printJob.status == "printing" || printJob.status == "post_print") @@ -245,12 +250,16 @@ Rectangle { return catalog.i18nc("@label:status", "Preparing") } + else if (printJob.configuration_changes_required != undefined && printJob.status == "queued") + { + return catalog.i18nc("@label:status", "Required action") + } else { - return "" + return printJob.status; } } - return catalog.i18nc("@label:status", "Available") + return catalog.i18nc("@label:status", "Available"); } elide: Text.ElideRight @@ -292,29 +301,37 @@ Rectangle width: parent.width - 2 * UM.Theme.getSize("default_margin").width - visible: printJob != null && (["wait_cleanup", "printing", "pre_print", "wait_for_configuration"].indexOf(printJob.status) !== -1) + visible: showExtended Label // Status detail { text: { + if ( ! printer.enabled) + { + return catalog.i18nc("@label", "Not accepting print jobs"); + } + if(printJob != null) { - if(printJob.status == "printing" ) + switch (printJob.status) { + case "printing": return catalog.i18nc("@label", "Finishes at: ") + OutputDevice.getTimeCompleted(printJob.time_total - printJob.time_elapsed) - } - if(printJob.status == "wait_cleanup") - { + case "wait_cleanup": return catalog.i18nc("@label", "Clear build plate") - } - if(printJob.status == "sent_to_printer" || printJob.status == "pre_print") - { + case "sent_to_printer": + case "pre_print": return catalog.i18nc("@label", "Preparing to print") - } - if(printJob.status == "wait_for_configuration") - { + case "wait_for_configuration": return catalog.i18nc("@label", "Not accepting print jobs") + case "queued": + if (printJob.configuration_changes_required != undefined) + { + return catalog.i18nc("@label", "Configuration change"); + } + default: + return ""; } } return "" From 01ff608a09da47e1d277021f996c4672837d51d3 Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 28 Sep 2017 11:40:48 +0200 Subject: [PATCH 2/5] Change "Required action" to "Action required" CL-118 --- plugins/UM3NetworkPrinting/PrinterInfoBlock.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml index c83865f8b1..c53ecdec8c 100644 --- a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml @@ -252,7 +252,7 @@ Rectangle } else if (printJob.configuration_changes_required != undefined && printJob.status == "queued") { - return catalog.i18nc("@label:status", "Required action") + return catalog.i18nc("@label:status", "Action required") } else { From 8658053a3b4e3851617150b8013445adb3348aad Mon Sep 17 00:00:00 2001 From: Simon Edwards Date: Thu, 28 Sep 2017 14:37:38 +0200 Subject: [PATCH 3/5] Improved status messages, and the 'printing' counter in the sidebar. CL-118 --- .../NetworkClusterPrinterOutputDevice.py | 2 +- plugins/UM3NetworkPrinting/PrinterInfoBlock.qml | 17 +++++++++++------ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py index 55f9d1247b..e8e33e8435 100644 --- a/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py +++ b/plugins/UM3NetworkPrinting/NetworkClusterPrinterOutputDevice.py @@ -494,7 +494,7 @@ class NetworkClusterPrinterOutputDevice(NetworkPrinterOutputDevice.NetworkPrinte def numJobsPrinting(self): num_jobs_printing = 0 for job in self._print_jobs: - if job["status"] == "printing": + if job["status"] in ["printing", "wait_cleanup", "sent_to_printer", "pre_print", "post_print"]: num_jobs_printing += 1 return num_jobs_printing diff --git a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml index c53ecdec8c..f53864659b 100644 --- a/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml +++ b/plugins/UM3NetworkPrinting/PrinterInfoBlock.qml @@ -248,15 +248,19 @@ Rectangle } else if (printJob.status == "pre_print" || printJob.status == "sent_to_printer") { - return catalog.i18nc("@label:status", "Preparing") + return catalog.i18nc("@label:status", "Preparing to print") } else if (printJob.configuration_changes_required != undefined && printJob.status == "queued") { return catalog.i18nc("@label:status", "Action required") } - else + else if (printJob.Status == "aborted") { - return printJob.status; + return catalog.i18nc("@label:status", "Aborted") + } + else + { + return ""; } } return catalog.i18nc("@label:status", "Available"); @@ -317,12 +321,13 @@ Rectangle switch (printJob.status) { case "printing": + case "post_print": return catalog.i18nc("@label", "Finishes at: ") + OutputDevice.getTimeCompleted(printJob.time_total - printJob.time_elapsed) case "wait_cleanup": return catalog.i18nc("@label", "Clear build plate") case "sent_to_printer": case "pre_print": - return catalog.i18nc("@label", "Preparing to print") + return catalog.i18nc("@label", "Leveling and heating") case "wait_for_configuration": return catalog.i18nc("@label", "Not accepting print jobs") case "queued": @@ -334,7 +339,7 @@ Rectangle return ""; } } - return "" + return ""; } elide: Text.ElideRight font: UM.Theme.getFont("default") @@ -344,7 +349,7 @@ Rectangle { text: { if(printJob != null) { - if(printJob.status == "printing" ) + if(printJob.status == "printing" || printJob.status == "post_print") { return OutputDevice.getDateCompleted(printJob.time_total - printJob.time_elapsed) } From 4e4e71ad4b3e6c7fc8062969846214cb09eff437 Mon Sep 17 00:00:00 2001 From: Mark Date: Thu, 28 Sep 2017 15:04:24 +0200 Subject: [PATCH 4/5] Change AGPL to LGPL --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f68d5683d9..a91ba535d5 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ setup(name="Cura", author="Ultimaker", author_email="a.hiemstra@ultimaker.com", url="http://software.ultimaker.com/", - license="GNU AFFERO GENERAL PUBLIC LICENSE (AGPL)", + license="GNU LESSER GENERAL PUBLIC LICENSE (LGPL)", scripts=["cura_app.py"], windows=[{"script": "cura_app.py", "dest_name": "Cura", "icon_resources": [(1, "icons/cura.ico")]}], #console=[{"script": "cura_app.py"}], From 92c407580a9fdfe49a28c533793ff5ea7112e434 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 28 Sep 2017 15:32:02 +0200 Subject: [PATCH 5/5] Comment out visibility of flow temperature graph Apparently it's not allowed to be in there. By being commented out I hope that a future developer won't make the same mistake and add it there to be editable in the interface. --- cura/Settings/MaterialSettingsVisibilityHandler.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cura/Settings/MaterialSettingsVisibilityHandler.py b/cura/Settings/MaterialSettingsVisibilityHandler.py index 44569ea0c3..5b6050d2c0 100644 --- a/cura/Settings/MaterialSettingsVisibilityHandler.py +++ b/cura/Settings/MaterialSettingsVisibilityHandler.py @@ -1,5 +1,5 @@ # Copyright (c) 2017 Ultimaker B.V. -# Uranium is released under the terms of the LGPLv3 or higher. +# Cura is released under the terms of the LGPLv3 or higher. import UM.Settings.Models.SettingVisibilityHandler @@ -11,7 +11,7 @@ class MaterialSettingsVisibilityHandler(UM.Settings.Models.SettingVisibilityHand "default_material_print_temperature", "material_bed_temperature", "material_standby_temperature", - "material_flow_temp_graph", + #"material_flow_temp_graph", "cool_fan_speed", "retraction_amount", "retraction_speed",