[orca] Fix for bug 681387 - Orca displays no braille when lists which are not listboxes claim focus in WebK
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 681387 - Orca displays no braille when lists which are not listboxes claim focus in WebK
- Date: Tue, 7 Aug 2012 15:57:54 +0000 (UTC)
commit b61054088ef8105d385dc66f81666f08c302fe62
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Aug 7 17:56:52 2012 +0200
Fix for bug 681387 - Orca displays no braille when lists which are not listboxes claim focus in WebKitGtk content
src/orca/braille_generator.py | 11 +++++++----
src/orca/speech_generator.py | 11 +++++++----
2 files changed, 14 insertions(+), 8 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index 2aa035b..a5984f4 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -289,11 +289,14 @@ class BrailleGenerator(generator.Generator):
try:
s = obj.querySelection()
except NotImplementedError:
- return result
+ isFocused = \
+ lambda x: x and x.getState().contains(pyatspi.STATE_FOCUSED)
+ items = pyatspi.utils.findAllDescendants(obj, isFocused)
+ else:
+ items = [s.getSelectedChild(i) for i in range(s.nSelectedChildren)]
+ if not items and obj.childCount:
+ items.append(obj[0])
- items = [s.getSelectedChild(i) for i in range(s.nSelectedChildren)]
- if not items and obj.childCount:
- items.append(obj[0])
items = list(map(self._generateName, items))
for item in items:
result.extend(item)
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 9ea543c..4217480 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -1454,11 +1454,14 @@ class SpeechGenerator(generator.Generator):
try:
s = obj.querySelection()
except NotImplementedError:
- return result
+ isFocused = \
+ lambda x: x and x.getState().contains(pyatspi.STATE_FOCUSED)
+ items = pyatspi.utils.findAllDescendants(obj, isFocused)
+ else:
+ items = [s.getSelectedChild(i) for i in range(s.nSelectedChildren)]
+ if not items and obj.childCount:
+ items.append(obj[0])
- items = [s.getSelectedChild(i) for i in range(s.nSelectedChildren)]
- if not items and obj.childCount:
- items.append(obj[0])
items = list(map(self._generateName, items))
for item in items:
result.extend(item)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]