Skip to content

Commit

Permalink
1809 -> 2103.
Browse files Browse the repository at this point in the history
  • Loading branch information
codeofdusk committed Apr 8, 2020
1 parent 5824e95 commit 66c56b9
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion source/UIAUtils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
41 changes: 22 additions & 19 deletions source/gui/settingsDialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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):
Expand Down
1 change: 1 addition & 0 deletions source/winVersion.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ def isUwpOcrAvailable():
1809: 17763,
1903: 18362,
1909: 18363,
2103: 19603 # Update this once stable
}


Expand Down
2 changes: 1 addition & 1 deletion user_docs/en/userGuide.t2t
Original file line number Diff line number Diff line change
Expand Up @@ -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.
-
Expand Down

0 comments on commit 66c56b9

Please sign in to comment.