Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
1,135 additions
and
570 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#appModules/taskmgr.py | ||
#A part of NonVisual Desktop Access (NVDA) | ||
#Copyright (C) 2018 NV Access Limited, Derek Riemer | ||
#This file is covered by the GNU General Public License. | ||
#See the file COPYING for more details. | ||
|
||
import appModuleHandler | ||
from NVDAObjects import NVDAObject | ||
from NVDAObjects.UIA import UIA | ||
|
||
def isChildOfRow(obj): | ||
""" | ||
calculates obj's ancestors , discovering if this is a child of a row. | ||
If obj is a child of a row, this returns true. | ||
""" | ||
while obj.parent and obj.parent.presentationType != obj.presType_content: | ||
if isinstance(obj.parent, UIA) and obj.parent.UIAElement.CachedAutomationID == u"TmViewRow": | ||
return True | ||
obj = obj.parent | ||
return False | ||
|
||
class BrokenUIAChild(UIA): | ||
#This is A child which is layout, but should be content. | ||
presentationType = NVDAObject.presType_content | ||
|
||
class AppModule(appModuleHandler.AppModule): | ||
def chooseNVDAObjectOverlayClasses(self, obj, clsList): | ||
if isinstance(obj, UIA) and obj.UIAElement.CachedAutomationID == u"TmRowIcon": | ||
#This is an icon and really is layout. Don't show it. | ||
return | ||
if obj.presentationType == obj.presType_layout and isChildOfRow(obj): | ||
clsList.insert(0, BrokenUIAChild) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.