diff --git a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py index 2c869195bc..d726cc04a9 100644 --- a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py +++ b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerJob.py @@ -112,7 +112,7 @@ class FirmwareUpdateCheckerJob(Job): # The first time we want to store the current version, the notification will not be shown, # because the new version of Cura will be release before the firmware and we don't want to # notify the user when no new firmware version is available. - if (checked_version != "") and (checked_version != current_version): + if checked_version != "" and checked_version != current_version: Logger.log("i", "Showing firmware update message for new version: {version}".format(version = current_version)) message = FirmwareUpdateCheckerMessage(machine_id, self._machine_name, current_version, self._lookups.getRedirectUserUrl()) diff --git a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerMessage.py b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerMessage.py index ca253e3ec6..493784c6d1 100644 --- a/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerMessage.py +++ b/plugins/FirmwareUpdateChecker/FirmwareUpdateCheckerMessage.py @@ -14,12 +14,12 @@ class FirmwareUpdateCheckerMessage(Message): def __init__(self, machine_id: int, machine_name: str, latest_version: str, download_url: str) -> None: super().__init__(i18n_catalog.i18nc( "@info Don't translate {machine_name}, since it gets replaced by a printer name!", - "New features or bug-fixes may be available for your {machine_name}! If not already at the latest version, " + "New features or bug-fixes may be available for your {machine_name}! If you haven't done so already, " "it is recommended to update the firmware on your printer to version {latest_version}.").format( machine_name = machine_name, latest_version = latest_version), title = i18n_catalog.i18nc( "@info:title The %s gets replaced with the printer name.", - "New %s firmware available") % machine_name) + "New %s stable firmware available") % machine_name) self._machine_id = machine_id self._download_url = download_url diff --git a/plugins/Toolbox/src/Toolbox.py b/plugins/Toolbox/src/Toolbox.py index 625289635a..c238d3f009 100644 --- a/plugins/Toolbox/src/Toolbox.py +++ b/plugins/Toolbox/src/Toolbox.py @@ -183,12 +183,15 @@ class Toolbox(QObject, Extension): self._application.getCuraAPI().account.loginStateChanged.connect(self._restart) + preferences = CuraApplication.getInstance().getPreferences() + + preferences.addPreference("info/automatic_plugin_update_check", True) + # On boot we check which packages have updates. - if CuraApplication.getInstance().getPreferences().getValue("info/automatic_update_check") and len(installed_package_ids_with_versions) > 0: + if preferences.getValue("info/automatic_plugin_update_check") and len(installed_package_ids_with_versions) > 0: # Request the latest and greatest! self._makeRequestByType("updates") - def _fetchPackageData(self) -> None: self._makeRequestByType("packages") self._makeRequestByType("authors") diff --git a/resources/definitions/ultimaker3.def.json b/resources/definitions/ultimaker3.def.json index 2e49dda806..46ade6d85b 100644 --- a/resources/definitions/ultimaker3.def.json +++ b/resources/definitions/ultimaker3.def.json @@ -32,7 +32,7 @@ [ "https://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version" ], - "update_url": "https://ultimaker.com/firmware" + "update_url": "https://ultimaker.com/firmware?utm_source=cura&utm_medium=software&utm_campaign=fw-update" }, "bom_numbers": [ 9066 diff --git a/resources/definitions/ultimaker3_extended.def.json b/resources/definitions/ultimaker3_extended.def.json index ba9824896f..970d3a405d 100644 --- a/resources/definitions/ultimaker3_extended.def.json +++ b/resources/definitions/ultimaker3_extended.def.json @@ -29,7 +29,7 @@ [ "https://software.ultimaker.com/releases/firmware/9066/stable/um-update.swu.version" ], - "update_url": "https://ultimaker.com/firmware" + "update_url": "https://ultimaker.com/firmware?utm_source=cura&utm_medium=software&utm_campaign=fw-update" }, "bom_numbers": [ 9511 diff --git a/resources/definitions/ultimaker_s3.def.json b/resources/definitions/ultimaker_s3.def.json index 43f32a96dc..3b61a18120 100644 --- a/resources/definitions/ultimaker_s3.def.json +++ b/resources/definitions/ultimaker_s3.def.json @@ -32,7 +32,7 @@ "firmware_update_info": { "id": 213482, "check_urls": ["https://software.ultimaker.com/releases/firmware/213482/stable/um-update.swu.version"], - "update_url": "https://ultimaker.com/firmware" + "update_url": "https://ultimaker.com/firmware?utm_source=cura&utm_medium=software&utm_campaign=fw-update" }, "bom_numbers": [ 213482 diff --git a/resources/definitions/ultimaker_s5.def.json b/resources/definitions/ultimaker_s5.def.json index 71de826953..8e701eeff4 100644 --- a/resources/definitions/ultimaker_s5.def.json +++ b/resources/definitions/ultimaker_s5.def.json @@ -33,7 +33,7 @@ "firmware_update_info": { "id": 9051, "check_urls": ["https://software.ultimaker.com/releases/firmware/9051/stable/um-update.swu.version"], - "update_url": "https://ultimaker.com/firmware" + "update_url": "https://ultimaker.com/firmware?utm_source=cura&utm_medium=software&utm_campaign=fw-update" }, "bom_numbers": [ 9051, 214475 diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 341b51c8b4..5b28396188 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -118,6 +118,10 @@ UM.PreferencesPage sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) UM.Preferences.resetPreference("info/automatic_update_check") checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) + + UM.Preferences.resetPreference("info/latest_update_source") + UM.Preferences.resetPreference("info/automatic_plugin_update_check") + pluginNotificationsUpdateCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_plugin_update_check")) } ScrollView @@ -766,30 +770,13 @@ UM.PreferencesPage Label { font.bold: true - visible: checkUpdatesCheckbox.visible || sendDataCheckbox.visible - text: catalog.i18nc("@label","Privacy") + text: catalog.i18nc("@label", "Privacy") } - UM.TooltipArea { width: childrenRect.width height: visible ? childrenRect.height : 0 - text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") - - CheckBox - { - id: checkUpdatesCheckbox - text: catalog.i18nc("@option:check","Check for updates on start") - checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check")) - onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked) - } - } - - UM.TooltipArea - { - width: childrenRect.width - height: visible ? childrenRect.height : 0 - text: catalog.i18nc("@info:tooltip","Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") + text: catalog.i18nc("@info:tooltip", "Should anonymous data about your print be sent to Ultimaker? Note, no models, IP addresses or other personally identifiable information is sent or stored.") CheckBox { @@ -811,6 +798,83 @@ UM.PreferencesPage } } + Item + { + //: Spacer + height: UM.Theme.getSize("default_margin").height + width: UM.Theme.getSize("default_margin").height + } + + Label + { + font.bold: true + text: catalog.i18nc("@label", "Updates") + } + + UM.TooltipArea + { + width: childrenRect.width + height: visible ? childrenRect.height : 0 + text: catalog.i18nc("@info:tooltip", "Should Cura check for updates when the program is started?") + + CheckBox + { + id: checkUpdatesCheckbox + text: catalog.i18nc("@option:check","Check for updates on start") + checked: boolCheck(UM.Preferences.getValue("info/automatic_update_check")) + onCheckedChanged: UM.Preferences.setValue("info/automatic_update_check", checked) + } + } + + ExclusiveGroup { id: curaUpdatesGroup } + UM.TooltipArea + { + width: childrenRect.width + height: visible ? childrenRect.height : 0 + text: catalog.i18nc("@info:tooltip", "When checking for updates, only check for stable releases.") + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + RadioButton + { + text: catalog.i18nc("@option:radio", "Stable releases only") + exclusiveGroup: curaUpdatesGroup + enabled: checkUpdatesCheckbox.checked + checked: UM.Preferences.getValue("info/latest_update_source") == "stable" + onClicked: UM.Preferences.setValue("info/latest_update_source", "stable") + } + } + UM.TooltipArea + { + width: childrenRect.width + height: visible ? childrenRect.height : 0 + text: catalog.i18nc("@info:tooltip", "When checking for updates, check for both stable and for beta releases.") + anchors.left: parent.left + anchors.leftMargin: UM.Theme.getSize("default_margin").width + RadioButton + { + text: catalog.i18nc("@option:radio", "Stable and Beta releases") + exclusiveGroup: curaUpdatesGroup + enabled: checkUpdatesCheckbox.checked + checked: UM.Preferences.getValue("info/latest_update_source") == "beta" + onClicked: UM.Preferences.setValue("info/latest_update_source", "beta") + } + } + UM.TooltipArea + { + width: childrenRect.width + height: visible ? childrenRect.height : 0 + text: catalog.i18nc("@info:tooltip", "Should an automatic check for new plugins be done every time Cura is started? It is highly recommended that you do not disable this!") + + CheckBox + { + id: pluginNotificationsUpdateCheckbox + text: catalog.i18nc("@option:check", "Get notifications for plugin updates") + checked: boolCheck(UM.Preferences.getValue("info/automatic_plugin_update_check")) + onCheckedChanged: UM.Preferences.setValue("info/automatic_plugin_update_check", checked) + } + } + + /* Multi-buildplate functionality is disabled because it's broken. See CURA-4975 for the ticket to remove it. Item {