[orca] Allow certain roles to be displayed even in brief braille mode
- From: William Walker <wwalker src gnome org>
- To: svn-commits-list gnome org
- Subject: [orca] Allow certain roles to be displayed even in brief braille mode
- Date: Thu, 9 Jul 2009 21:06:21 +0000 (UTC)
commit c5bcf121b3b6fa3637935e95b956108b5a2f2676
Author: Willie Walker <william walker sun com>
Date: Thu Jul 9 17:04:14 2009 -0400
Allow certain roles to be displayed even in brief braille mode
This resolves a regression between the old braille generator and the
new braille generator introduced with bgo#570658.
src/orca/braille_generator.py | 9 +++++----
src/orca/settings.py | 7 +++++++
2 files changed, 12 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index fee54ab..e656db1 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -119,10 +119,11 @@ class BrailleGenerator(generator.Generator):
"""
result = []
role = args.get('role', obj.getRole())
- if (settings.brailleVerbosityLevel \
- == settings.VERBOSITY_LEVEL_VERBOSE)\
- and not args.get('readingRow', False)\
- and (role != pyatspi.ROLE_UNKNOWN):
+ if (role in settings.brailleForceRoles)\
+ or ((settings.brailleVerbosityLevel \
+ == settings.VERBOSITY_LEVEL_VERBOSE)\
+ and not args.get('readingRow', False)\
+ and (role != pyatspi.ROLE_UNKNOWN)):
result.append(rolenames.getBrailleForRoleName(obj, role))
return result
diff --git a/src/orca/settings.py b/src/orca/settings.py
index 336d297..fbd2816 100644
--- a/src/orca/settings.py
+++ b/src/orca/settings.py
@@ -240,6 +240,13 @@ BRAILLE_ROLENAME_STYLE_SHORT = 0 # three letter abbreviations
BRAILLE_ROLENAME_STYLE_LONG = 1 # full rolename
brailleRolenameStyle = BRAILLE_ROLENAME_STYLE_LONG
+# Roles to force to be displayed even when the verbosity level
+# is not verbose.
+#
+brailleForceRoles = [pyatspi.ROLE_COMBO_BOX,
+ pyatspi.ROLE_MENU,
+ pyatspi.ROLE_TEAROFF_MENU_ITEM]
+
# Braille Selection Indicator (see brailleSelectorIndicator).
# The values represent the character to be used in the attrOr
# field of brlAPI's writeStruct.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]