[orca] Fix for bug 684951 - Do not present 'icon' and 'canvas' rolenames if verbosity is brief
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 684951 - Do not present 'icon' and 'canvas' rolenames if verbosity is brief
- Date: Wed, 9 Jan 2013 17:12:16 +0000 (UTC)
commit e1a9a60c43f5e48b613c445325f66ddc4efaa48d
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Jan 9 12:11:05 2013 -0500
Fix for bug 684951 - Do not present 'icon' and 'canvas' rolenames if verbosity is brief
src/orca/braille_generator.py | 11 ++++++++---
src/orca/speech_generator.py | 8 +++++++-
2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index a5984f4..aec557f 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -126,11 +126,16 @@ class BrailleGenerator(generator.Generator):
"""
result = []
role = args.get('role', obj.getRole())
+ verbosityLevel = _settingsManager.getSetting('brailleVerbosityLevel')
+
+ doNotPresent = [pyatspi.ROLE_UNKNOWN]
+ if verbosityLevel == settings.VERBOSITY_LEVEL_BRIEF:
+ doNotPresent.extend([pyatspi.ROLE_ICON, pyatspi.ROLE_CANVAS])
+
if (role in _settingsManager.getSetting('brailleForceRoles'))\
- or ((_settingsManager.getSetting('brailleVerbosityLevel') \
- == settings.VERBOSITY_LEVEL_VERBOSE)\
+ or (verbosityLevel == settings.VERBOSITY_LEVEL_VERBOSE\
and not args.get('readingRow', False)\
- and (role != pyatspi.ROLE_UNKNOWN)):
+ and role not in doNotPresent):
result.append(self.getLocalizedRoleName(obj, role))
return result
diff --git a/src/orca/speech_generator.py b/src/orca/speech_generator.py
index 00f11c9..d9ff094 100644
--- a/src/orca/speech_generator.py
+++ b/src/orca/speech_generator.py
@@ -258,7 +258,13 @@ class SpeechGenerator(generator.Generator):
result = []
acss = self.voice(SYSTEM)
role = args.get('role', obj.getRole())
- if (role != pyatspi.ROLE_UNKNOWN):
+
+ doNotPresent = [pyatspi.ROLE_UNKNOWN]
+ if _settingsManager.getSetting('speechVerbosityLevel') \
+ == settings.VERBOSITY_LEVEL_BRIEF:
+ doNotPresent.extend([pyatspi.ROLE_ICON, pyatspi.ROLE_CANVAS])
+
+ if role not in doNotPresent:
result.append(self.getLocalizedRoleName(obj, role))
result.extend(acss)
return result
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]