[orca] Additional fix for bug 543157 - It is not always possible to distinguish on-screen text from Orca's
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Additional fix for bug 543157 - It is not always possible to distinguish on-screen text from Orca's
- Date: Mon, 16 Aug 2010 19:44:12 +0000 (UTC)
commit 01a70cb4334355db22de1b55ea406eed410ae2b8
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Mon Aug 16 15:42:42 2010 -0400
Additional fix for bug 543157 - It is not always possible to distinguish on-screen text from Orca's "system" messages
This causes us to use the system voice to present 'read only'.
Also removes a duplicate/redundant acss from the text role.
src/orca/speech_generator.py | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index b816bde..bfb4268 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -178,6 +178,17 @@ class SpeechGenerator(generator.Generator):
result.extend(acss)
return result
+ def _generateReadOnly(self, obj, **args):
+ """Returns an array of strings for use by speech and braille that
+ represent the read only state of this object, but only if it
+ is read only (i.e., it is a text area that cannot be edited).
+ """
+ acss = self.voice(SYSTEM)
+ result = generator.Generator._generateReadOnly(self, obj, **args)
+ if result:
+ result.extend(acss)
+ return result
+
def _generateTextRole(self, obj, **args):
"""A convenience method to prevent the pyatspi.ROLE_PARAGRAPH role
from being spoken. In the case of a pyatspi.ROLE_PARAGRAPH
@@ -191,11 +202,9 @@ class SpeechGenerator(generator.Generator):
override.]]]
"""
result = []
- acss = self.voice(SYSTEM)
role = args.get('role', obj.getRole())
if role != pyatspi.ROLE_PARAGRAPH:
result.extend(self._generateRoleName(obj, **args))
- result.extend(acss)
return result
def _generateRoleName(self, obj, **args):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]