Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/beta' into masterToBeta
Browse files Browse the repository at this point in the history
  • Loading branch information
seanbudd committed Dec 19, 2024
2 parents a7781cd + 3989254 commit 0cc9967
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 2 deletions.
9 changes: 8 additions & 1 deletion source/NVDAObjects/IAccessible/ia2Web.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
)
from ctypes import c_short
from comtypes import COMError, BSTR
from comtypes.hresult import E_NOTIMPL

import oleacc
from annotation import (
Expand Down Expand Up @@ -336,7 +337,13 @@ def _get_mathMl(self):
# Try the data-mathml attribute.
attrNames = (BSTR * 1)("data-mathml")
namespaceIds = (c_short * 1)(0)
attr = node.attributesForNames(1, attrNames, namespaceIds)
try:
attr = node.attributesForNames(1, attrNames, namespaceIds)
except COMError as e:
if e.hresult != E_NOTIMPL:
log.debugWarning(f"MathML getting attr error: {e}")
raise
attr = None
if attr:
import mathPres

Expand Down
18 changes: 17 additions & 1 deletion source/brailleDisplayDrivers/brailliantB.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,27 @@ def __init__(self, port="auto"):

def _initAttempt(self):
if self.isHid:
# Ensure to set self.numCells only at the end of this method to prevent display writes before the capabilities/numCells request
numCells = 0
# First try to get cell count from _writeSize
try:
# _writeSize includes 4 bytes of overhead, so subtract 4
numCells = self._dev._writeSize - 4
except AttributeError:
log.debugWarning("Could not get _writeSize from HID device")

# Adjust numCells based on reported number of cells
try:
data: bytes = self._dev.getFeature(HR_CAPS)
reportedNumCells = data[24]
if reportedNumCells > 0:
# Update numCells based on reported cell count from the device
numCells = reportedNumCells
else:
log.debugWarning("Could not get number of cells from HID device using HR_CAPS")
except WindowsError:
return # Fail!
self.numCells = data[24]
self.numCells = numCells
else:
# This will cause the display to return the number of cells.
# The _serOnReceive callback will see this and set self.numCells.
Expand Down
9 changes: 9 additions & 0 deletions user_docs/en/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,15 @@ Use `gui.message.MessageDialog` instead. (#17304)
* `NoConsoleOptionParser`, `stringToBool`, `stringToLang` in `__main__`; use the same symbols in `argsParsing` instead.
* `__main__.parser`; use `argsParsing.getParser()` instead.

## 2024.4.2

This is a patch release to fix bugs with braille devices and reading math in Chromium.

### Bug fixes

* Fixed bug with with reading math in Chromium Browsers (Chrome, Edge). (#17421, @NSoiffer)
* Humanware Brailliant BI 40X devices running firmware version 2.4 now work as expected. (#17518, @bramd)

## 2024.4.1

This is a patch release to fix a bug when saving speech symbol dictionaries.
Expand Down

0 comments on commit 0cc9967

Please sign in to comment.