From 1d001b5a79c20b1417a9d3cfb118afd39a7f9a42 Mon Sep 17 00:00:00 2001 From: Bill Dengler Date: Wed, 8 Apr 2020 19:37:23 -0400 Subject: [PATCH] 1809 -> 2103. --- source/UIAUtils.py | 2 +- source/gui/settingsDialogs.py | 41 +++++++++++++++++++---------------- source/winVersion.py | 1 + user_docs/en/userGuide.t2t | 2 +- 4 files changed, 25 insertions(+), 21 deletions(-) diff --git a/source/UIAUtils.py b/source/UIAUtils.py index a20ea4b49e7..969d07a4985 100644 --- a/source/UIAUtils.py +++ b/source/UIAUtils.py @@ -244,4 +244,4 @@ def shouldUseUIAConsole(setting=None): # ignore it. # It does not implement caret/selection, and probably has no # new text events. - return isWin10(1809) + return isWin10(2103) diff --git a/source/gui/settingsDialogs.py b/source/gui/settingsDialogs.py index af8df7e6340..7bfd0da5d43 100644 --- a/source/gui/settingsDialogs.py +++ b/source/gui/settingsDialogs.py @@ -2321,7 +2321,7 @@ def __init__(self, parent): self.consoleCombo = UIAGroup.addLabeledControl(consoleComboText, wx.Choice, choices=consoleChoices) self.consoleCombo.Bind( wx.EVT_CHOICE, - self.enableConsolePasswordsCheckBox, + self.enableTerminalCheckBoxes, self.consoleCombo ) curChoice = self.consoleVals.index( @@ -2346,14 +2346,13 @@ def __init__(self, parent): self.speakPasswordsCheckBox = terminalsGroup.addItem(wx.CheckBox(self, label=label)) self.speakPasswordsCheckBox.SetValue(config.conf["terminals"]["speakPasswords"]) self.speakPasswordsCheckBox.defaultValue = self._getDefaultValue(["terminals", "speakPasswords"]) - self.enableConsolePasswordsCheckBox() # Translators: This is the label for a checkbox in the # Advanced settings panel. label = _("Use the new t&yped character support in legacy Windows consoles when available") self.keyboardSupportInLegacyCheckBox=terminalsGroup.addItem(wx.CheckBox(self, label=label)) self.keyboardSupportInLegacyCheckBox.SetValue(config.conf["terminals"]["keyboardSupportInLegacy"]) self.keyboardSupportInLegacyCheckBox.defaultValue = self._getDefaultValue(["terminals", "keyboardSupportInLegacy"]) - self.keyboardSupportInLegacyCheckBox.Enable(winVersion.isWin10(1607)) + self.enableTerminalCheckBoxes() # Translators: This is the label for a group of advanced options in the # Advanced settings panel @@ -2430,12 +2429,13 @@ def __init__(self, parent): ] self.Layout() - def enableConsolePasswordsCheckBox(self, evt=None): - return self.speakPasswordsCheckBox.Enable( - shouldUseUIAConsole(self.consoleVals[ - self.consoleCombo.GetSelection() - ]) - ) + def enableTerminalCheckBoxes(self, evt=None): + UIAEnabled = shouldUseUIAConsole(self.consoleVals[ + self.consoleCombo.GetSelection() + ]) + self.speakPasswordsCheckBox.Enable(UIAEnabled) + self.keyboardSupportInLegacyCheckBox.Enable(not UIAEnabled and winVersion.isWin10(1607)) + def onOpenScratchpadDir(self,evt): path=config.getScratchpadDir(ensureExists=True) @@ -2446,16 +2446,19 @@ def _getDefaultValue(self, configPath): def haveConfigDefaultsBeenRestored(self): return ( - self._defaultsRestored and - self.scratchpadCheckBox.IsChecked() == self.scratchpadCheckBox.defaultValue and - self.UIAInMSWordCheckBox.IsChecked() == self.UIAInMSWordCheckBox.defaultValue and - self.consoleCombo.GetSelection() == self.consoleCombo.defaultValue and - self.speakPasswordsCheckBox.IsChecked() == self.speakPasswordsCheckBox.defaultValue and - self.keyboardSupportInLegacyCheckBox.IsChecked() == self.keyboardSupportInLegacyCheckBox.defaultValue and - self.autoFocusFocusableElementsCheckBox.IsChecked() == self.autoFocusFocusableElementsCheckBox.defaultValue and - self.caretMoveTimeoutSpinControl.GetValue() == self.caretMoveTimeoutSpinControl.defaultValue and - set(self.logCategoriesList.CheckedItems) == set(self.logCategoriesList.defaultCheckedItems) and - True # reduce noise in diff when the list is extended. + self._defaultsRestored + and self.scratchpadCheckBox.IsChecked() == self.scratchpadCheckBox.defaultValue + and self.UIAInMSWordCheckBox.IsChecked() == self.UIAInMSWordCheckBox.defaultValue + and self.consoleCombo.GetSelection() == self.consoleCombo.defaultValue + and self.speakPasswordsCheckBox.IsChecked() == self.speakPasswordsCheckBox.defaultValue + and self.keyboardSupportInLegacyCheckBox.IsChecked() == self.keyboardSupportInLegacyCheckBox.defaultValue + and ( + self.autoFocusFocusableElementsCheckBox.IsChecked() + == self.autoFocusFocusableElementsCheckBox.defaultValue + ) + and self.caretMoveTimeoutSpinControl.GetValue() == self.caretMoveTimeoutSpinControl.defaultValue + and set(self.logCategoriesList.CheckedItems) == set(self.logCategoriesList.defaultCheckedItems) + and True # reduce noise in diff when the list is extended. ) def restoreToDefaults(self): diff --git a/source/winVersion.py b/source/winVersion.py index 2e551f5ffca..85b4b1cd232 100644 --- a/source/winVersion.py +++ b/source/winVersion.py @@ -37,6 +37,7 @@ def isUwpOcrAvailable(): 1809: 17763, 1903: 18362, 1909: 18363, + 2103: 19603 # Update this once stable } diff --git a/user_docs/en/userGuide.t2t b/user_docs/en/userGuide.t2t index dd64501ea5b..26b9ede4c9e 100644 --- a/user_docs/en/userGuide.t2t +++ b/user_docs/en/userGuide.t2t @@ -1786,7 +1786,7 @@ It does not affect the modern Windows Terminal. In Windows 10 version 1709, Microsoft [added support for its UI Automation API to the console https://devblogs.microsoft.com/commandline/whats-new-in-windows-console-in-windows-10-fall-creators-update/], bringing vastly improved performance and stability for screen readers that support it. In situations where UI Automation is unavailable or known to result in an inferior user experience, NVDA's legacy console support is available as a fallback. The Windows Console support combo box has three options: -- Automatic: Uses UI Automation in consoles on Windows 10 version 1809 and later. This option is recommended and set by default. +- Automatic: Uses UI Automation in consoles on Windows 10 version 2103 and later. This option is recommended and set by default. - Prefer UIA: Uses UI Automation in consoles if available, even on Windows versions with incomplete or buggy implementations. While this limited functionality may be useful (and even sufficient for your usage), use of this option is entirely at your own risk and no support for it will be provided. - Legacy: UI Automation in the Windows Console will be completely disabled, so the legacy fallback will always be used. -