nvda
cbb71399 - When opening user config directory from the start menu ask NVDA to open the currently used config via RPC (#13099)

Commit
4 years ago
When opening user config directory from the start menu ask NVDA to open the currently used config via RPC (#13099) Fixes #13094 Summary of the issue: When opening user configuration directory from the start menu NVDA first tries to open path from `globalVars.appArgs.configPath` and if this fails falls back to the default path for the configuration. In PR #13082 a 'fake' implementation of `globalVars.appArgs` has been provided, and therefore `configPath` always exists, but for nvda_slave is set to `None`. This causes a wrong folder to be opened (`ShellExecute` opens a default document folder when given `NULL` as a file to open for whatever reason). Aside from this newly introduced issue if the `configPath` is overridden from the command line for the running instance of NVDA this was not reflected when opening user configuration directory from the start menu since slave has no access to `globalVars` of the running NVDA. Description of how this pull request fixes the issue: - If NVDA is running slave requests NVDA to open currently used configuration folder via RPC - When NVDA is not running, or the version in use has older RPC interface which does not support opening of the config directory the behavior has not changed and the default directory is opened. - Type hints were added to our wrapper around `ShellExecute` and it is no longer possible to pass `None` as a file to be opened. Testing strategy: With the launcher created from the code in this PR: - Ensured that gesture for opening current user config opens correct folder both when configuration has been overridden from the command line or not - With the build from this PR installed and NVDA running activated an option to open configuration directory from the start menu both with the default config and the different folder specified from the command line - made sure that correct folder was opened in both cases - With the build from this PR installed and without running NVDA activated a shortcut to open config folder from the start menu - made sure that the default configuration directory was opened - With the build from this PR installed and older version of NVDA running made sure that when 'explore user configuration directory' is invoked from the start menu default configuration folder is opened and there is no error. - With the build from this PR installed and older version of NVDA running made sure #11867 has not been reintroduced by opening an add-on file from the Windows Explorer.
Author
Parents
Loading