Skip to content

Improve reliability of opening user configuration directory from the start menu#13099

Merged
seanbudd merged 1 commit intonvaccess:masterfrom
lukaszgo1:I13094
Nov 29, 2021
Merged

Improve reliability of opening user configuration directory from the start menu#13099
seanbudd merged 1 commit intonvaccess:masterfrom
lukaszgo1:I13094

Conversation

@lukaszgo1
Copy link
Copy Markdown
Contributor

Link to issue number:

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 Unable to install add-ons on last alpha #11867 has not been reintroduced by opening an add-on file from the Windows Explorer.

Known issues with pull request:

None known

Change log entries:

None needed - unreleased regression.

Code Review Checklist:

  • Pull Request description:
    • description is up to date
    • change log entries
  • Testing:
    • Unit tests
    • System (end to end) tests
    • Manual testing
  • API is compatible with existing add-ons.
  • Documentation:
    • User Documentation
    • Developer / Technical Documentation
    • Context sensitive help for GUI changes
  • UX of all users considered:
    • Speech
    • Braille
    • Low Vision
    • Different web browsers
    • Localization in other languages / culture than English

@lukaszgo1 lukaszgo1 marked this pull request as ready for review November 25, 2021 19:59
@lukaszgo1 lukaszgo1 requested a review from a team as a code owner November 25, 2021 19:59
@lukaszgo1 lukaszgo1 requested a review from seanbudd November 25, 2021 19:59
@seanbudd seanbudd added this to the 2022.1 milestone Nov 26, 2021
@seanbudd
Copy link
Copy Markdown
Member

Thanks @lukaszgo1, LGTM

@seanbudd seanbudd merged commit cbb7139 into nvaccess:master Nov 29, 2021
@lukaszgo1 lukaszgo1 deleted the I13094 branch November 29, 2021 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The shortcut to Explore User Config directory in the start menu cannot open the user config directory

2 participants