[orca] Fix for bgo#607042 - Orca does not always present sufficient context in Where Am I
- From: Joanmarie Diggs <joanied src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [orca] Fix for bgo#607042 - Orca does not always present sufficient context in Where Am I
- Date: Sat, 16 Jan 2010 20:00:28 +0000 (UTC)
commit 9b140d505c1d8d9d2cb3d30ab3b9eccd30015c94
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Fri Jan 15 19:32:12 2010 -0500
Fix for bgo#607042 - Orca does not always present sufficient context in Where Am I
src/orca/formatting.py | 2 +-
src/orca/generator.py | 15 +++++++++++++++
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/formatting.py b/src/orca/formatting.py
index 083f710..62057fa 100644
--- a/src/orca/formatting.py
+++ b/src/orca/formatting.py
@@ -112,7 +112,7 @@ formatting = {
pyatspi.ROLE_CHECK_BOX: {
'focused': 'checkedState',
'unfocused': 'labelAndName + roleName + checkedState + required + availability + ' + MNEMONIC + ' + accelerator',
- 'basicWhereAmI': 'labelAndName + roleName + checkedState + ' + MNEMONIC + ' + accelerator + required'
+ 'basicWhereAmI': 'namedContainingPanel + labelAndName + roleName + checkedState + ' + MNEMONIC + ' + accelerator + required'
},
pyatspi.ROLE_CHECK_MENU_ITEM: {
'focused': 'checkedState',
diff --git a/src/orca/generator.py b/src/orca/generator.py
index 4ee1fb9..1b9d4a7 100644
--- a/src/orca/generator.py
+++ b/src/orca/generator.py
@@ -1002,3 +1002,18 @@ class Generator:
rad = self._script.getRealActiveDescendant(obj)
args['role'] = rad.getRole()
return self._generateRoleName(rad, **args)
+
+ def _generateNamedContainingPanel(self, obj, **args):
+ """Returns an array of strings for use by speech and braille that
+ represents the nearest ancestor of an object which is a named panel.
+ """
+ result = []
+ parent = obj.parent
+ while parent and (parent.parent != parent):
+ if parent.getRole() == pyatspi.ROLE_PANEL:
+ label = self._generateLabelAndName(parent)
+ if label:
+ result.extend(label)
+ break
+ parent = parent.parent
+ return result
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]