Add option to preference to switch between stable & beta for update checker

CURA-7689
This commit is contained in:
Jaime van Kessel 2021-07-26 13:35:36 +02:00
parent b7ee3298c2
commit d0654aa4d0
No known key found for this signature in database
GPG Key ID: 3710727397403C91

View File

@ -118,6 +118,8 @@ UM.PreferencesPage
sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info")) sendDataCheckbox.checked = boolCheck(UM.Preferences.getValue("info/send_slice_info"))
UM.Preferences.resetPreference("info/automatic_update_check") UM.Preferences.resetPreference("info/automatic_update_check")
checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check")) checkUpdatesCheckbox.checked = boolCheck(UM.Preferences.getValue("info/automatic_update_check"))
UM.Preferences.resetPreference("info/latest_update_source")
} }
ScrollView ScrollView
@ -774,7 +776,7 @@ UM.PreferencesPage
{ {
width: childrenRect.width width: childrenRect.width
height: visible ? childrenRect.height : 0 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 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 UM.TooltipArea
{ {
width: childrenRect.width width: childrenRect.width