[orca] Add support for ROLE_LIST_BOX for Gecko content
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Add support for ROLE_LIST_BOX for Gecko content
- Date: Tue, 5 Aug 2014 14:50:51 +0000 (UTC)
commit be2754991ec0b89e54d6e31b5c1b18d2b1e58770
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Tue Aug 5 10:50:03 2014 -0400
Add support for ROLE_LIST_BOX for Gecko content
src/orca/scripts/toolkits/Gecko/script.py | 11 +++++++----
.../scripts/toolkits/Gecko/speech_generator.py | 1 +
src/orca/structural_navigation.py | 1 +
3 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/Gecko/script.py b/src/orca/scripts/toolkits/Gecko/script.py
index fcffe13..9628148 100644
--- a/src/orca/scripts/toolkits/Gecko/script.py
+++ b/src/orca/scripts/toolkits/Gecko/script.py
@@ -1281,7 +1281,7 @@ class Script(default.Script):
state = candidate.getState()
except (LookupError, RuntimeError):
state = pyatspi.StateSet()
- if role in [pyatspi.ROLE_LIST, pyatspi.ROLE_COMBO_BOX] \
+ if role in [pyatspi.ROLE_LIST, pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_LIST_BOX] \
and state.contains(pyatspi.STATE_FOCUSABLE) \
and not self.utilities.isSameObject(obj, candidate):
start = self.utilities.characterOffsetInParent(candidate)
@@ -1811,7 +1811,7 @@ class Script(default.Script):
if not weHandleIt:
weHandleIt = role == pyatspi.ROLE_MENU_ITEM
- elif role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_MENU_ITEM]:
+ elif role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_MENU_ITEM, pyatspi.ROLE_LIST_BOX]:
weHandleIt = keyboardEvent.event_string in ["Left", "Right"]
elif role == pyatspi.ROLE_LIST_ITEM:
@@ -2158,6 +2158,7 @@ class Script(default.Script):
pyatspi.ROLE_COMBO_BOX,
pyatspi.ROLE_DOCUMENT_FRAME,
pyatspi.ROLE_LIST,
+ pyatspi.ROLE_LIST_BOX,
pyatspi.ROLE_ENTRY,
pyatspi.ROLE_PASSWORD_TEXT,
pyatspi.ROLE_PUSH_BUTTON]
@@ -2557,6 +2558,7 @@ class Script(default.Script):
#
doNotDescend = obj.getState().contains(pyatspi.STATE_FOCUSABLE) \
and obj.getRole() in [pyatspi.ROLE_COMBO_BOX,
+ pyatspi.ROLE_LIST_BOX,
pyatspi.ROLE_LIST]
text = self.utilities.queryNonEmptyText(obj)
@@ -2666,6 +2668,7 @@ class Script(default.Script):
#
doNotDescend = obj.getState().contains(pyatspi.STATE_FOCUSABLE) \
and obj.getRole() in [pyatspi.ROLE_COMBO_BOX,
+ pyatspi.ROLE_LIST_BOX,
pyatspi.ROLE_LIST]
text = self.utilities.queryNonEmptyText(obj)
@@ -2813,7 +2816,7 @@ class Script(default.Script):
while previousObj.childCount:
role = previousObj.getRole()
state = previousObj.getState()
- if role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_MENU]:
+ if role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_LIST_BOX, pyatspi.ROLE_MENU]:
break
elif role == pyatspi.ROLE_LIST \
and state.contains(pyatspi.STATE_FOCUSABLE) \
@@ -2870,7 +2873,7 @@ class Script(default.Script):
# a bit of a challenge.]]]
#
role = obj.getRole()
- if role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_MENU]:
+ if role in [pyatspi.ROLE_COMBO_BOX, pyatspi.ROLE_LIST_BOX, pyatspi.ROLE_MENU]:
descend = False
elif role == pyatspi.ROLE_LIST \
and obj.getState().contains(pyatspi.STATE_FOCUSABLE) \
diff --git a/src/orca/scripts/toolkits/Gecko/speech_generator.py
b/src/orca/scripts/toolkits/Gecko/speech_generator.py
index 69cc970..0933bf7 100644
--- a/src/orca/scripts/toolkits/Gecko/speech_generator.py
+++ b/src/orca/scripts/toolkits/Gecko/speech_generator.py
@@ -145,6 +145,7 @@ class SpeechGenerator(speech_generator.SpeechGenerator):
pyatspi.ROLE_COMBO_BOX,
pyatspi.ROLE_ENTRY,
pyatspi.ROLE_LIST,
+ pyatspi.ROLE_LIST_BOX,
pyatspi.ROLE_PARAGRAPH,
pyatspi.ROLE_PASSWORD_TEXT,
pyatspi.ROLE_RADIO_BUTTON,
diff --git a/src/orca/structural_navigation.py b/src/orca/structural_navigation.py
index 8bd1efc..d3ec421 100644
--- a/src/orca/structural_navigation.py
+++ b/src/orca/structural_navigation.py
@@ -554,6 +554,7 @@ class StructuralNavigation:
pyatspi.ROLE_COMBO_BOX,
pyatspi.ROLE_DOCUMENT_FRAME, # rich text editing
pyatspi.ROLE_LIST,
+ pyatspi.ROLE_LIST_BOX,
pyatspi.ROLE_ENTRY,
pyatspi.ROLE_PASSWORD_TEXT,
pyatspi.ROLE_PUSH_BUTTON,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]