Update Remote's dialogs to better match NVDA (#17814)
Fixes #17786
Fixes #17787
Fixes #17816
Partial fix of #17788
Fixes #17854
Summary of the issue:
Remote's dialogs, in particular the settings panel and connection
dialog, do not match the rest of NVDA's dialogs.
Description of user facing changes
- Remote settings panel:
- Spacing has been added.
- Now uses dropdowns rather than radio buttons
- Has been slightly reorganised
- The "Delete trusted fingerprints" button is only enabled when there
are fingerprints to delete
- The warning about deleting trusted fingerprints has been rewritten
- Most controls have had accelerator keys added.
- Context help has been added for all controls, and for the settings
panel.
- Now shows as pertaining to the normal configuration
- Connect dialog:
- The dialog now appears centred on screen.
- Spacing has been added.
- Now uses dropdowns rather than radio boxes.
- No longer resizes based on the chosen connection type.
- Uses a combination of horizontal and vertical layout (ex. each control
is on the same line as its label, but each such grouping is on a new
line).
- Context help has been added for the dialog, as well as the relay
server and local server panels.
- When generating a key using a relay server, an indeterminate progress
dialog is shown, and a message displayed if the process fails.
- When getting one's external IP, an indeterminate progress dialog is
shown.
- User guide
- The Remote settings panel and all of its controls have been documented
in the user guide.
- The connection dialog has been described in the user guide.
- Terminology
- Some terminology has been slightly modified.
- The choice of whether to be controlling or controlled computer is now
labeled as "Mode".
- The choice of whether to use a relay server or local server is now
labelled "Server", and the options "Use existing" and "Host locally".
Description of development approach
Overall:
Added `DisplayStringEnum`s for connection mode and server type, and used
them when asking for that information from the user. Additionally
updated the config spec to use those types, and reads from/writes to
config to use them too.
Settings panel:
- Added the options for automatic connection to their own group, so they
can be enabled/disabled in unison
- Slightly rewrote some of the event handlers to use other functions,
reducing code duplication
- Marked most methods of `RemoteSettingsPanel` as internal
- Added `RemoteSettingsPanel` to
`NVDASettingsDialog._doOnCategoryChange`
Connection dialog:
- Rewrote the connection dialog to make better use of sizers, and
`BoxSizerHelper`.
- Switched to using a `wx.SimpleBook` and a `wx.Choice` to switch which
panel to show (`ClientPanel` or `ServerPanel`).
- Refactored some of the code to be simpler and less WET.
- Marked most methods and attributes of `ClientPanel`, `ServerPanel` and
`DirectConnectDialog` as internal.
Testing strategy:
Attempted to save settings with automatic connection enabled and various
combinations of controls populated to check that validation still works
as expected.
Established connections directly with various combinations of settings
to ensure validation still works correctly.
Known issues with pull request:
Errors are logged when asking a relay server to generate a key fails, or
getting the external IP fails. These were not introduced by this PR and
are out of scope.