Switches: add adjustable setting to CustomName and Group#2843
Open
ybott-qinetic wants to merge 1 commit intomainfrom
Open
Switches: add adjustable setting to CustomName and Group#2843ybott-qinetic wants to merge 1 commit intomainfrom
ybott-qinetic wants to merge 1 commit intomainfrom
Conversation
Adds "/Settings/Adjustable" to settings, this provides a readonly flag for settings. Currently only protects CustomName and Group. Contributes to #2790
blammit
reviewed
Mar 5, 2026
| uid: root.switchableOutput.uid + "/Settings/Adjustable" | ||
| } | ||
|
|
||
| readonly property bool _readOnly: _adjustable.valid && _adjustable.value == 0 ? 1 : 0 |
Contributor
There was a problem hiding this comment.
Can assign a bool rather than a number as the value?
Contributor
There was a problem hiding this comment.
Maybe "writeable" is nicer than "read-only", to allow the list items to use this property without a negation (interactive: root._writeable instead of interactive: !root._readOnly).
|
|
||
| required property SwitchableOutput switchableOutput | ||
|
|
||
| readonly property VeQuickItem _adjustable: VeQuickItem { |
Contributor
There was a problem hiding this comment.
Doesn't need to be a property, as the root type is an Item
| dataItem.uid: root.switchableOutput.uid + "/Settings/Group" | ||
| dataItem.invalidate: false | ||
| writeAccessLevel: VenusOS.User_AccessType_User | ||
| interactive: !_readOnly |
Contributor
There was a problem hiding this comment.
As per #2790 (comment), the Adjustable value should affect the writeability of all settings, not just the group and custom name.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds "/Settings/Adjustable" to settings, this provides a readonly
flag for settings. Currently only protects CustomName and Group.
Contributes to #2790