From d0654aa4d04deefe66e0733467b3848d0b45e1f9 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Mon, 26 Jul 2021 13:35:36 +0200 Subject: [PATCH] Add option to preference to switch between stable & beta for update checker CURA-7689 --- resources/qml/Preferences/GeneralPage.qml | 38 ++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/resources/qml/Preferences/GeneralPage.qml b/resources/qml/Preferences/GeneralPage.qml index 341b51c8b4..e35b8c22f0 100644 --- a/resources/qml/Preferences/GeneralPage.qml +++ b/resources/qml/Preferences/GeneralPage.qml @@ -118,6 +118,8 @@ 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") } ScrollView @@ -774,7 +776,7 @@ UM.PreferencesPage { width: childrenRect.width height: visible ? childrenRect.height : 0 - text: catalog.i18nc("@info:tooltip","Should Cura check for updates when the program is started?") + text: catalog.i18nc("@info:tooltip", "Should Cura check for updates when the program is started?") CheckBox { @@ -785,6 +787,40 @@ UM.PreferencesPage } } + 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