nvda
a66ecbf4 - Persist screen curtain state when changed through settings dialog (#19836)

Commit
3 days ago
Persist screen curtain state when changed through settings dialog (#19836) Fixes 19783 ### Summary of the issue: When modified through the settings dialog, the state of the screen curtain is not persisted to the config. ### Description of user facing changes: The screen curtain state is now persisted to the config when changed through the settings dialog. ### Description of developer facing changes: None ### Description of development approach: Added a `_screenCurtainCheckboxChanged` bool to the privacy and security panel. Initially set to `False`, it is set to `True` when the user successfully interacts with the checkbox (that is, uses it to enable or disable the screen curtain). It is never set back to `False`. In `onSave`, store the state of the checkbox as the value of `config.conf["screenCurtain"]["enabled"] if and only if this new flag is `True`. ### Testing strategy: Tested altering the screen curtain state from the Privacy and Security settings panel as follows: | Screen curtain | `config.conf["screenCurtain"]["enabled"]` | Screen is | Open privasy and security and... | `config.conf["screenCurtain"]["enabled"]` | Screen is | Then... | `config.conf["screenCurtain"]["enabled"]` | Screen is | |---|---|---|---|---|---|---|---|---| | Disabled | `False` | Visible | Do nothing | `False` | Visible | Press Cancel | `False` | Visible | | Disabled | `False` | Visible | Do nothing | `False` | Visible | Press OK | `False` | Visible | | Disabled | `False` | Visible | Check to enable | `False` | Obscured | Press Cancel | `False` |Visible | | Disabled | `False` | Visible | Check to enable | `False` | Obscured | Press OK | `True` | Obscured | | Disabled | `False` | Visible | Check then uncheck to enable then disable | `False` | Visible | Press Cancel | `False` | Visible | | Disabled | `False` | Visible | Check then uncheck to enable then disable | `False` | Visible | Press OK | `False` | Visible | | Temporary | `False` | Obscured | Do nothing | `False` | Obscured | Press Cancel | `False` | Obscured | | Temporary | `False` | Obscured | Do nothing | `False` | Obscured | Press OK | `False` | Obscured | | Temporary | `False` | Obscured | Uncheck to disable | `False` | Visible | Press Cancel | `False` | Obscured | | Temporary | `False` | Obscured | Uncheck to disable | `False` | Visible | Press OK | `False` | Visible | | Temporary | `False` | Obscured | Uncheck then check to disable then enable | `False` | Obscured | Press Cancel | `False` | Obscured | | Temporary | `False` | Obscured | Uncheck then check to disable then enable | `False` | Obscured | Press OK | `True` | Obscured | | Enabled | `True` | Obscured | Do nothing | `True` | Obscured | Press Cancel | `True` | Obscured | | Enabled | `True` | Obscured | Do nothing | `True` | Obscured | Press OK | `True` | Obscured | | Enabled | `True` | Obscured | Uncheck to disable | `True` | Visible | Press Cancel | `True` | Obscured | | Enabled | `True` | Obscured | Uncheck to disable | `True` | Visible | Press OK | `False` | Visible | | Enabled | `True` | Obscured | Uncheck then check to disable then enable | `True` | Obscured | Press Cancel | `True` | Obscured | | Enabled | `True` | Obscured | Uncheck then check to disable then enable | `True` | Obscured | Press OK | `True` | Obscured | ### Known issues with pull request: It's possibly slightly unintuitive that starting from a temporary screen curtain, if one unchecks then checks the screen curtain checkbox and saves settings, the screen curtain will subsequently be enabled, not temporary.
Author
Parents
Loading