Skip to content

Commit 2335315

Browse files
authored
Merge ace6811 into 4840e5f
2 parents 4840e5f + ace6811 commit 2335315

2 files changed

Lines changed: 20 additions & 4 deletions

File tree

source/browseMode.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import gui
2424
import ui
2525
import cursorManager
26-
from scriptHandler import isScriptWaiting, willSayAllResume
26+
from scriptHandler import script, isScriptWaiting, willSayAllResume
2727
import aria
2828
import controlTypes
2929
from controlTypes import OutputReason
@@ -1844,3 +1844,14 @@ def _iterNotLinkBlock(self, direction="next", pos=None):
18441844
"kb:shift+,": "moveToStartOfContainer",
18451845
"kb:,": "movePastEndOfContainer",
18461846
}
1847+
1848+
@script(
1849+
description=_(
1850+
# Translators: the description for the toggleScreenLayout script.
1851+
"Toggles on and off if the screen layout is preserved while rendering the document content"
1852+
),
1853+
gesture="kb:NVDA+v",
1854+
)
1855+
def script_toggleScreenLayout(self, gesture):
1856+
# Translators: The message reported for not supported toggling of screen layout
1857+
ui.message(_("Not supported in this document."))

source/virtualBuffers/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
import review
1616
import NVDAHelper
1717
import XMLFormatting
18+
from scriptHandler import script, isScriptWaiting, willSayAllResume
1819
import scriptHandler
19-
from scriptHandler import isScriptWaiting, willSayAllResume
2020
import speech
2121
import NVDAObjects
2222
import api
@@ -539,6 +539,13 @@ def script_refreshBuffer(self,gesture):
539539
# Translators: the description for the refreshBuffer script on virtualBuffers.
540540
script_refreshBuffer.__doc__ = _("Refreshes the document content")
541541

542+
@script(
543+
description=_(
544+
# Translators: the description for the toggleScreenLayout script on virtualBuffers.
545+
"Toggles on and off if the screen layout is preserved while rendering the document content"
546+
),
547+
gesture="kb:NVDA+v",
548+
)
542549
def script_toggleScreenLayout(self,gesture):
543550
config.conf["virtualBuffers"]["useScreenLayout"]=not config.conf["virtualBuffers"]["useScreenLayout"]
544551
if config.conf["virtualBuffers"]["useScreenLayout"]:
@@ -547,8 +554,6 @@ def script_toggleScreenLayout(self,gesture):
547554
else:
548555
# Translators: Presented when use screen layout option is toggled.
549556
ui.message(_("Use screen layout off"))
550-
# Translators: the description for the toggleScreenLayout script on virtualBuffers.
551-
script_toggleScreenLayout.__doc__ = _("Toggles on and off if the screen layout is preserved while rendering the document content")
552557

553558
def _searchableAttributesForNodeType(self,nodeType):
554559
pass

0 commit comments

Comments
 (0)