[orca] Announce replaced focused object if name has changed
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Announce replaced focused object if name has changed
- Date: Tue, 20 Aug 2019 19:09:26 +0000 (UTC)
commit ce35ac1d92e9dd1443591faa5b5421e1a6dbdf18
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Aug 20 15:05:24 2019 -0400
Announce replaced focused object if name has changed
If the focused object gets destroyed and replaced with an object with
a different name, we want to present that name change to the user.
src/orca/scripts/web/script.py | 4 +++-
src/orca/scripts/web/script_utilities.py | 4 ++--
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/web/script.py b/src/orca/scripts/web/script.py
index 7fb5b3950..5f5c74093 100644
--- a/src/orca/scripts/web/script.py
+++ b/src/orca/scripts/web/script.py
@@ -1644,9 +1644,11 @@ class Script(default.Script):
if self.utilities.isZombie(obj):
if self.utilities.isSameObject(obj, event.any_data, comparePaths=True, ignoreNames=True):
+ path, role, name = self.utilities.getCaretContextPathRoleAndName()
+ notify = event.any_data.name != name
msg = "WEB: Event handled by updating locusOfFocus and context"
debug.println(debug.LEVEL_INFO, msg, True)
- orca.setLocusOfFocus(event, event.any_data, False)
+ orca.setLocusOfFocus(event, event.any_data, notify)
self.utilities.setCaretContext(event.any_data, offset)
return True
diff --git a/src/orca/scripts/web/script_utilities.py b/src/orca/scripts/web/script_utilities.py
index 12f39b644..81b843bec 100644
--- a/src/orca/scripts/web/script_utilities.py
+++ b/src/orca/scripts/web/script_utilities.py
@@ -4029,7 +4029,7 @@ class Utilities(script_utilities.Utilities):
return obj, offset
- def _getCaretContextPathRoleAndName(self, documentFrame=None):
+ def getCaretContextPathRoleAndName(self, documentFrame=None):
documentFrame = documentFrame or self.documentFrame()
if not documentFrame:
return [-1], None, None
@@ -4077,7 +4077,7 @@ class Utilities(script_utilities.Utilities):
self._priorContexts.pop(hash(parent), None)
def findContextReplicant(self, documentFrame=None, matchRole=True, matchName=True):
- path, oldRole, oldName = self._getCaretContextPathRoleAndName(documentFrame)
+ path, oldRole, oldName = self.getCaretContextPathRoleAndName(documentFrame)
obj = self.getObjectFromPath(path)
if obj and matchRole:
if obj.getRole() != oldRole:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]