[orca/570658] In tables, include accessible's parent when searching for focused region
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658] In tables, include accessible's parent when searching for focused region
- Date: Wed, 8 Jul 2009 00:11:43 +0000 (UTC)
commit 8f97ffccaee04ad84d37b039e648ade14c16940e
Author: Willie Walker <william walker sun com>
Date: Tue Jul 7 19:55:48 2009 -0400
In tables, include accessible's parent when searching for focused region
src/orca/braille_generator.py | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index e13532b..3cc37cd 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -74,20 +74,14 @@ class BrailleGenerator(generator.Generator):
args['formatType'] = 'focused'
result = self.generate(obj, **args)
- #print "RESULTS:"
- #for region in result:
- # if isinstance(region, (braille.Component, braille.Text)) \
- # and region.accessible == obj:
- # print " (*)", region
- # else:
- # print " ", region
-
# We guess at the focused region. It's going to be a
# Component or Text region whose accessible is the same
# as the object we're generating braille for. There is
# a small hack-like thing here where we include knowledge
# that we represent the text area of editable comboboxes
- # instead of the combobox itself.
+ # instead of the combobox itself. We also do the same
+ # for table cells because they sometimes have children
+ # that we present.
#
try:
focusedRegion = result[0]
@@ -103,6 +97,11 @@ class BrailleGenerator(generator.Generator):
and region.accessible.parent == obj:
focusedRegion = region
break
+ elif isinstance(region, braille.Component) \
+ and obj.getRole() == pyatspi.ROLE_TABLE_CELL \
+ and region.accessible.parent == obj:
+ focusedRegion = region
+ break
return [result, focusedRegion]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]