Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIA: assume Windows 7 is in use and remove constants that are now part of current interface #8422

Merged
merged 5 commits into from Jul 18, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
18 changes: 8 additions & 10 deletions source/UIAHandler.py
@@ -1,10 +1,9 @@
#UIAHandler.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2008-2016 NV Access Limited
#Copyright (C) 2008-2018 NV Access Limited, Joseph Lee
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.

import winVersion
from comtypes import COMError
import config
from logHandler import log
Expand All @@ -13,14 +12,13 @@
isUIAAvailable=False

if config.conf and config.conf["UIA"]["enabled"]:
winver=winVersion.winVersion.major+(winVersion.winVersion.minor/10.0)
if winver>=config.conf["UIA"]["minWindowsVersion"]:
try:
from _UIAHandler import *
isUIAAvailable=True
except ImportError:
log.debugWarning("Unable to import _UIAHandler",exc_info=True)
pass
# Because Windows 7 SP1 (NT 6.1) or later is supported, just assume UIA can be used unless told otherwise.
try:
from _UIAHandler import *
isUIAAvailable=True
except ImportError:
log.debugWarning("Unable to import _UIAHandler",exc_info=True)
pass

def initialize():
global handler
Expand Down
15 changes: 1 addition & 14 deletions source/_UIAHandler.py
Expand Up @@ -26,22 +26,9 @@

from comtypes.gen.UIAutomationClient import *

#Some new win8 UIA constants that could be missing
UIA_StyleIdAttributeId=40034
UIA_AnnotationAnnotationTypeIdPropertyId=30113
UIA_AnnotationTypesAttributeId=40031
AnnotationType_SpellingError=60001
UIA_AnnotationObjectsAttributeId=40032
StyleId_Heading1=70001
StyleId_Heading9=70009
#Some newer UIA constants that could be missing
ItemIndex_Property_GUID=GUID("{92A053DA-2969-4021-BF27-514CFC2E4A69}")
ItemCount_Property_GUID=GUID("{ABBF5C45-5CCC-47b7-BB4E-87CB87BBD162}")
UIA_FullDescriptionPropertyId=30159
UIA_LevelPropertyId=30154
UIA_PositionInSetPropertyId=30152
UIA_SizeOfSetPropertyId=30153
UIA_LocalizedLandmarkTypePropertyId=30158
UIA_LandmarkTypePropertyId=30157

HorizontalTextAlignment_Left=0
HorizontalTextAlignment_Centered=1
Expand Down
1 change: 0 additions & 1 deletion source/config/configSpec.py
Expand Up @@ -181,7 +181,6 @@
followMouse = boolean(default=False)

[UIA]
minWindowsVersion = float(default=6.1)
enabled = boolean(default=true)
useInMSWordWhenAvailable = boolean(default=false)

Expand Down
1 change: 1 addition & 0 deletions user_docs/en/changes.t2t
Expand Up @@ -45,6 +45,7 @@ What's New in NVDA
- listUsbDevices now yields dictionaries with device information including hardwareID and devicePath.
- Dictionaries yielded by listComPorts now also contain a usbID entry for COM ports with USB VID/PID information in their hardware ID.
- Updated wxPython to 4.0.3. (#7077)
- As NVDA now only supports Windows 7 SP1 and later, the key "minWindowsVersion" used to check if UIA should be enabled for a particular release of Windows has been removed. (#8422)


= 2018.2 =
Expand Down