nvda
5e44446e - Make Screen Curtain profile independent (#19177)

Commit
59 days ago
Make Screen Curtain profile independent (#19177) Fixes #10476 Partially addresses #16272 ### Summary of the issue: Currently, the Screen Curtain is configuration profile dependent. This can lead to situations in which it is unexpectedly deactivated by a config profile change. ### Description of user facing changes: 1. The Screen Curtain is no-longer config profile dependent. 2. Screen Curtain settings have been moved to anew "Privacy and Security" settings category. ### Description of developer facing changes: The `visionEnhancementProviders.screenCurtain` module has bee removed. ### Description of development approach: * Added a new `screenCurtain` subpackage, and migrated the existing `visionEnhancementProviders.screenCurtain` implementation. * The global object pattern was used, as it is a common pattern throughout the rest of NVDA's code. * The core Screen Curtain code is in `screenCurtain._screenCurtain`. The public API is accessible from `screenCurtan`, including the global `screenCurtain.screenCurtain` object. * Updated `core.main` and `core.resetConfiguration` to initializeand terminate screen curtain. * Updated the screen curtain toggle script to use the new implementation. * Updated the OCR script and screen curtain block action. * Re-implemented the screen curtain settings as regular settings in a new "Privacy and Security" panl in `gui.settingsDialogs`. * I decided to call this category "Privacy and Security" rather than "Security and Privacy" (as suggested in #16272), as we already have a "Speech" category, but no categories beginnin wit 'P'. * Also added an unassigned command to jump directly to the privacy and security settings. * Completely removed the `visionEnhancementProviders.screenCurtain` module, and updated the change log to reflect that previously deprecated symbols that had redirects in this module have been removed. * Bumped the config schema version, and added a profile upgrade step that moves the settings out of `vision` and into the root section. As the config keys are otherwise identical, this is all that is necessary. * Updated changed strings to use `pgettext` (category "screenCurtain") ### Testing strategy: Running from source: * Enabled tempory screen curtain with the gesture, with and without the warning enabled. Disabled. * Enabled screen curtain with the gesture, with and without the dialog enabled. Disabled. * Checked and uncheckd the screen curtain option in Privacy and Security settings, with and without the warning enabled. Also checked that unchecking the option to show a warning was reflected in the settings dialog when the warning dialog was shown from NVDA settings. * Enabled and disabled Screen Curtain with sounds turned on and off. * Created a configuration profile. Enabled screen curtain. Saved settings. Activated the profile. Deactivated screen curtain. Saved settings. Switched back to normal config. * Reset to saved configuration after enabling and disabling screen curtain, and reset configuration to factory defaults. * Ran from source on master, and changed screen curtain settings. Ran from source on this branch and ensured the old settings were reflected. Saved the config to disk and ensured that the settings were correctly persisted to `nvda.ini`. ### Known issues with pull request: None
Author
Parents
Loading