Skip to content

Commit 260f8e5

Browse files
authored
Merge 422786e into 9cac34b
2 parents 9cac34b + 422786e commit 260f8e5

22 files changed

Lines changed: 451 additions & 73 deletions

devDocs/developerGuide.t2t

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,9 @@ The following keyword arguments can be used when applying the script decorator:
468468
This option defaults to False.
469469
- bypassInputHelp: A boolean indicating whether this script should run when input help is active.
470470
This option defaults to False.
471+
- resumeSayAllMode: The say all mode that should be resumed when active before executing this script.
472+
The constants for say all mode are prefixed with CURSOR_ and specified in the sayAllHandler modules.
473+
If resumeSayAllMode is not specified, say all does not resume after this script.
471474
-
472475

473476
Though the script decorator makes the script definition process a lot easier, there are more ways of binding gestures and setting script properties.

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ For reference, the following run time dependencies are included in Git submodule
8787
* [IAccessible2](https://wiki.linuxfoundation.org/accessibility/iaccessible2/start), commit cbc1f29631780
8888
* [ConfigObj](https://github.com/DiffSK/configobj), commit f9a265c
8989
* [Six](https://pypi.python.org/pypi/six), version 1.12.0, required by wxPython and ConfigObj
90-
* [liblouis](http://www.liblouis.org/), version 3.14.0
90+
* [liblouis](http://www.liblouis.org/), version 3.15.0
9191
* [Unicode Common Locale Data Repository (CLDR)](http://cldr.unicode.org/) Emoji Annotations, version 37.0
9292
* NVDA images and sounds
9393
* [Adobe Acrobat accessibility interface, version XI](https://download.macromedia.com/pub/developer/acrobat/AcrobatAccess.zip)

source/NVDAObjects/window/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import displayModel
1717
import eventHandler
1818
from NVDAObjects import NVDAObject
19-
from NVDAObjects.behaviors import EditableText, LiveText
19+
from NVDAObjects.behaviors import EditableText, EditableTextWithoutAutoSelectDetection, LiveText
2020
import watchdog
2121
from locationHelper import RectLTWH
2222

@@ -390,7 +390,8 @@ class Desktop(Window):
390390
def _get_name(self):
391391
return _("Desktop")
392392

393-
class DisplayModelEditableText(EditableText, Window):
393+
394+
class DisplayModelEditableText(EditableTextWithoutAutoSelectDetection, Window):
394395

395396
role=controlTypes.ROLE_EDITABLETEXT
396397
TextInfo = displayModel.EditableTextDisplayModelTextInfo

source/addonHandler/__init__.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
state={}
4343

44-
# addons that are blocked from running because they are incompatible
44+
# Add-ons that are blocked from running because they are incompatible
4545
_blockedAddons=set()
4646

4747
def loadState():
@@ -77,7 +77,7 @@ def saveState():
7777
log.debugWarning("Error saving state", exc_info=True)
7878

7979
def getRunningAddons():
80-
""" Returns currently loaded addons.
80+
""" Returns currently loaded add-ons.
8181
"""
8282
return getAvailableAddons(filterFunc=lambda addon: addon.isRunning)
8383

@@ -96,7 +96,7 @@ def getIncompatibleAddons(
9696
))
9797

9898
def completePendingAddonRemoves():
99-
"""Removes any addons that could not be removed on the last run of NVDA"""
99+
"""Removes any add-ons that could not be removed on the last run of NVDA"""
100100
user_addons = os.path.abspath(os.path.join(globalVars.appArgs.configPath, "addons"))
101101
pendingRemovesSet=state['pendingRemovesSet']
102102
for addonName in list(pendingRemovesSet):
@@ -166,7 +166,7 @@ def terminate():
166166

167167
def _getDefaultAddonPaths():
168168
""" Returns paths where addons can be found.
169-
For now, only <userConfig\addons is supported.
169+
For now, only <userConfig>\addons is supported.
170170
@rtype: list(string)
171171
"""
172172
addon_paths = []
@@ -448,18 +448,19 @@ def loadModule(self, name):
448448
return None
449449

450450
def getTranslationsInstance(self, domain='nvda'):
451-
""" Gets the gettext translation instance for this addon.
452-
<addon-path<\locale will be used to find .mo files, if exists.
451+
""" Gets the gettext translation instance for this add-on.
452+
<addon-path>\\locale will be used to find .mo files, if exists.
453453
If a translation file is not found the default fallback null translation is returned.
454-
@param domain: the tranlation domain to retrieve. The 'nvda' default should be used in most cases.
454+
@param domain: the translation domain to retrieve. The 'nvda' default should be used in most cases.
455455
@returns: the gettext translation class.
456456
"""
457457
localedir = os.path.join(self.path, "locale")
458458
return gettext.translation(domain, localedir=localedir, languages=[languageHandler.getLanguage()], fallback=True)
459459

460460
def runInstallTask(self,taskName,*args,**kwargs):
461461
"""
462-
Executes the function having the given taskName with the given args and kwargs in the addon's installTasks module if it exists.
462+
Executes the function having the given taskName with the given args and kwargs,
463+
in the add-on's installTasks module if it exists.
463464
"""
464465
if not hasattr(self,'_installTasksModule'):
465466
self._installTasksModule=self.loadModule('installTasks')
@@ -502,7 +503,7 @@ def getDocFilePath(self, fileName=None):
502503
def getCodeAddon(obj=None, frameDist=1):
503504
""" Returns the L{Addon} where C{obj} is defined. If obj is None the caller code frame is assumed to allow simple retrieval of "current calling addon".
504505
@param obj: python object or None for default behaviour.
505-
@param frameDist: howmany frames is the caller code. Only change this for functions in this module.
506+
@param frameDist: how many frames is the caller code. Only change this for functions in this module.
506507
@return: L{Addon} instance or None if no code does not belong to a add-on package.
507508
@rtype: C{Addon}
508509
"""
@@ -530,7 +531,7 @@ def initTranslation():
530531
addon = getCodeAddon(frameDist=2)
531532
translations = addon.getTranslationsInstance()
532533
# Point _ to the translation object in the globals namespace of the caller frame
533-
# FIXME: shall we retrieve the caller module object explicitly?
534+
# FIXME: should we retrieve the caller module object explicitly?
534535
try:
535536
callerFrame = inspect.currentframe().f_back
536537
callerFrame.f_globals['_'] = translations.gettext
@@ -610,7 +611,7 @@ def createAddonBundleFromPath(path, destDir=None):
610611
""" Creates a bundle from a directory that contains a a addon manifest file."""
611612
basedir = os.path.abspath(path)
612613
# If caller did not provide a destination directory name
613-
# Put the bundle at the same level of the addon's top directory,
614+
# Put the bundle at the same level as the add-on's top-level directory,
614615
# That is, basedir/..
615616
if destDir is None:
616617
destDir = os.path.dirname(basedir)
@@ -672,7 +673,7 @@ class AddonManifest(ConfigObj):
672673
docFileName = string(default=None)
673674
674675
# NOTE: apiVersion:
675-
# Eg: 2019.1.0 or 0.0.0
676+
# EG: 2019.1.0 or 0.0.0
676677
# Must have 3 integers separated by dots.
677678
# The first integer must be a Year (4 characters)
678679
# "0.0.0" is also valid.
@@ -682,7 +683,7 @@ class AddonManifest(ConfigObj):
682683

683684
def __init__(self, input, translatedInput=None):
684685
""" Constructs an L{AddonManifest} instance from manifest string data
685-
@param input: data to read the manifest informatinon
686+
@param input: data to read the manifest information
686687
@type input: a fie-like object.
687688
@param translatedInput: translated manifest input
688689
@type translatedInput: file-like object

source/addonHandler/addonVersionCheck.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import addonAPIVersion
88

99
def hasAddonGotRequiredSupport(addon, currentAPIVersion=addonAPIVersion.CURRENT):
10-
"""True if NVDA provides the add-on with an API version high enough to meets the addon's minimum requirements
10+
"""True if NVDA provides the add-on with an API version high enough to meet the add-on's minimum requirements
1111
"""
1212
minVersion = addon.minimumNVDAVersion
1313
return minVersion <= currentAPIVersion

source/appModules/fastlogentry.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# A part of NonVisual Desktop Access (NVDA)
2+
# Copyright (C) 2020 NV Access Limited, Łukasz Golonka
3+
# This file may be used under the terms of the GNU General Public License, version 2 or later.
4+
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html
5+
6+
import appModuleHandler
7+
from NVDAObjects.window import DisplayModelEditableText
8+
from NVDAObjects.window.edit import UnidentifiedEdit
9+
10+
11+
class TSynMemo(DisplayModelEditableText):
12+
13+
name = None # Name is complete garbage as well.
14+
15+
16+
class AppModule(appModuleHandler.AppModule):
17+
18+
def chooseNVDAObjectOverlayClasses(self, obj, clsList):
19+
windowClass = obj.windowClassName
20+
if windowClass == "TSynMemo":
21+
# #8996: Edit fields in Fast Log Entry can't use UnidentifiedEdit
22+
# because their WindowText contains complete garbage.
23+
try:
24+
clsList.remove(UnidentifiedEdit)
25+
except ValueError:
26+
pass
27+
clsList.insert(0, TSynMemo)

source/browseMode.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#browseMode.py
2-
#A part of NonVisual Desktop Access (NVDA)
3-
#Copyright (C) 2007-2018 NV Access Limited, Babbage B.V.
4-
#This file is covered by the GNU General Public License.
5-
#See the file COPYING for more details.
1+
# A part of NonVisual Desktop Access (NVDA)
2+
# Copyright (C) 2007-2020 NV Access Limited, Babbage B.V. Thomas Stivers
3+
# This file is covered by the GNU General Public License.
4+
# See the file COPYING for more details.
65

76
import itertools
87
import collections
@@ -38,6 +37,7 @@
3837
import gui.guiHelper
3938
from gui.dpiScalingHelper import DpiScalingHelperMixinWithoutInit
4039
from NVDAObjects import NVDAObject
40+
import gui.contextHelp
4141
from abc import ABCMeta, abstractmethod
4242
from typing import Optional
4343

@@ -883,7 +883,12 @@ def _get_disableAutoPassThrough(self):
883883
del qn
884884

885885

886-
class ElementsListDialog(DpiScalingHelperMixinWithoutInit, wx.Dialog):
886+
class ElementsListDialog(
887+
DpiScalingHelperMixinWithoutInit,
888+
gui.contextHelp.ContextHelpMixin,
889+
wx.Dialog # wxPython does not seem to call base class initializer, put last in MRO
890+
):
891+
helpId = "ElementsList"
887892
ELEMENT_TYPES = (
888893
# Translators: The label of a radio button to select the type of element
889894
# in the browse mode Elements List dialog.

source/buildVersion.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def formatVersionForGUI(year, major, minor):
6666
# Version information for NVDA
6767
name = "NVDA"
6868
version_year = 2020
69-
version_major = 3
69+
version_major = 4
7070
version_minor = 0
7171
version_build = 0 # Should not be set manually. Set in 'sconscript' provided by 'appVeyor.yml'
7272
version=_formatDevVersionString()

source/globalCommands.py

100755100644
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3012,7 +3012,7 @@ def _moveGesturesForProfileActivationScript(cls, oldScriptName, newScriptName=No
30123012
@param oldScriptName: The current name of the profile activation script.
30133013
@type oldScriptName: str
30143014
@param newScriptName: The new name for the profile activation script, if any.
3015-
if C{None}, the gestures are only removed for the current profile sript.
3015+
if C{None}, the gestures are only removed for the current profile script.
30163016
@type newScriptName: str
30173017
"""
30183018
gestureMap = inputCore.manager.userGestureMap

0 commit comments

Comments
 (0)