[orca/570658] Adjust calls to inDocumentContent to take an object
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca/570658] Adjust calls to inDocumentContent to take an object
- Date: Thu, 2 Jul 2009 18:32:16 +0000 (UTC)
commit f2e1d6b60b3283451dd78fefe35987ff36e906c9
Author: Willie Walker <william walker sun com>
Date: Thu Jul 2 14:30:12 2009 -0400
Adjust calls to inDocumentContent to take an object
Also add _generateInDocumentContent method for use by formatting strings
.../scripts/toolkits/Gecko/braille_generator.py | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/braille_generator.py b/src/orca/scripts/toolkits/Gecko/braille_generator.py
index 7f51026..48dcf36 100644
--- a/src/orca/scripts/toolkits/Gecko/braille_generator.py
+++ b/src/orca/scripts/toolkits/Gecko/braille_generator.py
@@ -50,6 +50,11 @@ class BrailleGenerator(braille_generator.BrailleGenerator):
def __init__(self, script):
braille_generator.BrailleGenerator.__init__(self, script)
+ def _generateInDocumentContent(self, obj, **args):
+ """Returns True if this object is in HTML document content.
+ """
+ return self._script.inDocumentContent(obj)
+
def _generateImageLink(self, obj, **args):
"""Returns the link (if any) for this image.
"""
@@ -174,7 +179,7 @@ class BrailleGenerator(braille_generator.BrailleGenerator):
and role in [pyatspi.ROLE_LIST,
pyatspi.ROLE_PARAGRAPH,
pyatspi.ROLE_TEXT] \
- and self._script.inDocumentContent() \
+ and self._script.inDocumentContent(obj) \
and not self._script.isAriaWidget(obj):
label = self._script.guessTheLabel(obj)
if label:
@@ -186,7 +191,7 @@ class BrailleGenerator(braille_generator.BrailleGenerator):
#
if not len(result) \
and role == pyatspi.ROLE_COMBO_BOX \
- and not self._script.inDocumentContent():
+ and not self._script.inDocumentContent(obj):
result.append(obj.name)
# If this is an autocomplete, and we'll make the label be the
@@ -231,7 +236,7 @@ class BrailleGenerator(braille_generator.BrailleGenerator):
result = []
# ARIA widgets get treated like regular default widgets.
#
- args['includeContext'] = not self._script.inDocumentContent()
+ args['includeContext'] = not self._script.inDocumentContent(obj)
args['useDefaultFormatting'] = \
self._script.isAriaWidget(obj) \
or ((obj.getRole() == pyatspi.ROLE_LIST) \
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]