Skip to content

Commit 2e07e2e

Browse files
authored
Merge 60bd349 into 65a2c3c
2 parents 65a2c3c + 60bd349 commit 2e07e2e

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

source/NVDAObjects/window/winword.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,20 @@ def script_increaseDecreaseFontSize(self,gesture):
13601360
# Translators: a message when increasing or decreasing font size in Microsoft Word
13611361
ui.message(_("{size:g} point font").format(size=val))
13621362

1363+
def script_toggleChangeTracking(self,gesture):
1364+
if not self.WinwordDocumentObject:
1365+
# We cannot fetch the Word object model, so we therefore cannot report the status change.
1366+
# The object model may be unavailable because this is a pure UIA implementation such as Windows 10 Mail, or its within Windows Defender Application Guard.
1367+
# In this case, just let the gesture through and don't erport anything.
1368+
return gesture.send()
1369+
val=self._WaitForValueChangeForAction(lambda: gesture.send(),lambda: self.WinwordDocumentObject.TrackRevisions)
1370+
if val:
1371+
# Translators: a message when toggling change tracking in Microsoft word
1372+
ui.message(_("Change tracking on"))
1373+
else:
1374+
# Translators: a message when toggling change tracking in Microsoft word
1375+
ui.message(_("Change tracking off"))
1376+
13631377
def script_tab(self,gesture):
13641378
"""
13651379
A script for the tab key which:
@@ -1464,6 +1478,7 @@ def initOverlayClass(self):
14641478
"kb:control+1":"changeLineSpacing",
14651479
"kb:control+2":"changeLineSpacing",
14661480
"kb:control+5":"changeLineSpacing",
1481+
"kb:control+shift+e":"toggleChangeTracking",
14671482
"kb:tab": "tab",
14681483
"kb:shift+tab": "tab",
14691484
"kb:control+pageUp": "caret_moveByLine",

0 commit comments

Comments
 (0)