-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Zone: Step towards zones not bound to a single node (#43)
Remaining stumble points: - AutoAction: Based on controlID - Context: Based on nodes
- Loading branch information
1 parent
db580aa
commit f6d3858
Showing
3 changed files
with
132 additions
and
95 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 |
---|---|---|
|
@@ -21,7 +21,7 @@ | |
|
||
|
||
|
||
__version__ = "2024.07.19" | ||
__version__ = "2024.07.25" | ||
__authors__ = ( | ||
"Shirley Noël <[email protected]>", | ||
"Julien Cochuyt <[email protected]>", | ||
|
@@ -615,7 +615,7 @@ def initData(self, context): | |
rule = result.rule | ||
if ( | ||
rule.type in (ruleTypes.PARENT, ruleTypes.ZONE) | ||
and node in result.node | ||
and result.containsNode(node) | ||
): | ||
parents.insert(0, rule.name) | ||
self.contextParentCombo.Set(parents) | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
# -*- coding: utf-8 -*- | ||
|
||
# This file is part of Web Access for NVDA. | ||
# Copyright (C) 2015-2021 Accessolutions (http://accessolutions.fr) | ||
# Copyright (C) 2015-2024 Accessolutions (http://accessolutions.fr) | ||
# | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
|
@@ -23,7 +23,7 @@ | |
WebAccess overlay classes | ||
""" | ||
|
||
__version__ = "2021.03.12" | ||
__version__ = "2024.07.24" | ||
__author__ = "Julien Cochuyt <[email protected]>" | ||
|
||
|
||
|
@@ -505,10 +505,10 @@ def _caretMovementScriptHelper( | |
msg += _("Press escape to cancel zone restriction.") | ||
ui.message(msg) | ||
if posConstant == textInfos.POSITION_FIRST: | ||
pos = zone.startOffset | ||
pos = zone.result.startOffset | ||
posConstant = textInfos.offsets.Offsets(pos, pos) | ||
elif posConstant == textInfos.POSITION_LAST: | ||
pos = max(zone.endOffset - 1, zone.startOffset) | ||
pos = max(zone.result.endOffset - 1, zone.result.startOffset) | ||
posConstant = textInfos.offsets.Offsets(pos, pos) | ||
super()._caretMovementScriptHelper( | ||
gesture, | ||
|
@@ -557,12 +557,12 @@ def _iterNodesByType(self, itemType, direction="next", pos=None): | |
direction | ||
): | ||
if zone: | ||
if item.textInfo._startOffset < zone.startOffset: | ||
if item.textInfo._startOffset < zone.result.startOffset: | ||
if direction == "next": | ||
continue | ||
else: | ||
return | ||
elif item.textInfo._startOffset >= zone.endOffset: | ||
elif item.textInfo._startOffset >= zone.result.endOffset: | ||
if direction == "previous": | ||
continue | ||
else: | ||
|
Oops, something went wrong.