[orca] Fix for bgo#616637 - Orca is double-presenting state changes for radio buttons and checkboxes in Jav
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bgo#616637 - Orca is double-presenting state changes for radio buttons and checkboxes in Jav
- Date: Fri, 23 Apr 2010 11:50:45 +0000 (UTC)
commit 98b1a4af7d6e24a92f6d5c79c1a68e4f574805fb
Author: Joanmarie Diggs <joanmarie diggs gmail com>
Date: Fri Apr 23 07:45:50 2010 -0400
Fix for bgo#616637 - Orca is double-presenting state changes for radio buttons and checkboxes in Java
.../scripts/toolkits/J2SE-access-bridge/script.py | 5 +++-
test/keystrokes/java/role_check_box.py | 24 +++--------------
test/keystrokes/java/role_radio_button.py | 27 ++-----------------
3 files changed, 11 insertions(+), 45 deletions(-)
---
diff --git a/src/orca/scripts/toolkits/J2SE-access-bridge/script.py b/src/orca/scripts/toolkits/J2SE-access-bridge/script.py
index ba676c9..8a41876 100644
--- a/src/orca/scripts/toolkits/J2SE-access-bridge/script.py
+++ b/src/orca/scripts/toolkits/J2SE-access-bridge/script.py
@@ -344,7 +344,10 @@ class Script(default.Script):
# We'll ignore value changed events for Java's toggle buttons since
# they also send a redundant object:state-changed:checked event.
#
- if event.source.getRole() == pyatspi.ROLE_TOGGLE_BUTTON:
+ ignoreRoles = [pyatspi.ROLE_TOGGLE_BUTTON,
+ pyatspi.ROLE_RADIO_BUTTON,
+ pyatspi.ROLE_CHECK_BOX]
+ if event.source.getRole() in ignoreRoles:
return
# Java's SpinButtons are the most caret movement happy thing
diff --git a/test/keystrokes/java/role_check_box.py b/test/keystrokes/java/role_check_box.py
index 402e010..03a3074 100644
--- a/test/keystrokes/java/role_check_box.py
+++ b/test/keystrokes/java/role_check_box.py
@@ -102,12 +102,8 @@ sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX,5000))
sequence.append(utils.AssertPresentationAction(
"One checkbox checked",
- ["BUG? - Why are we presenting the state twice?",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel <x> One CheckBox'",
- " VISIBLE: '<x> One CheckBox', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel <x> One CheckBox'",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel <x> One CheckBox'",
" VISIBLE: '<x> One CheckBox', cursor=1",
- "SPEECH OUTPUT: 'checked'",
"SPEECH OUTPUT: 'checked'"]))
########################################################################
@@ -132,12 +128,8 @@ sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX, 5000))
sequence.append(utils.AssertPresentationAction(
"One checkbox unchecked",
- ["BUG? - Why are we presenting the state twice?",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel < > One CheckBox'",
- " VISIBLE: '< > One CheckBox', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel < > One CheckBox'",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Text CheckBoxes Panel < > One CheckBox'",
" VISIBLE: '< > One CheckBox', cursor=1",
- "SPEECH OUTPUT: 'not checked'",
"SPEECH OUTPUT: 'not checked'"]))
sequence.append(KeyComboAction("Tab"))
@@ -179,12 +171,8 @@ sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX, 5000))
sequence.append(utils.AssertPresentationAction(
"One lightbulb checkbox checked",
- ["BUG? - Why are we presenting the state twice?",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel <x> One CheckBox'",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel <x> One CheckBox'",
" VISIBLE: '<x> One CheckBox', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel <x> One CheckBox'",
- " VISIBLE: '<x> One CheckBox', cursor=1",
- "SPEECH OUTPUT: 'checked'",
"SPEECH OUTPUT: 'checked'"]))
sequence.append(utils.StartRecordingAction())
@@ -193,12 +181,8 @@ sequence.append(WaitAction("object:state-changed:checked", None,
None, pyatspi.ROLE_CHECK_BOX, 5000))
sequence.append(utils.AssertPresentationAction(
"One lightbulb unchecked checkbox",
- ["BUG? - Why are we presenting the state twice?",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel < > One CheckBox'",
- " VISIBLE: '< > One CheckBox', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel < > One CheckBox'",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Check Boxes TabList Check Boxes Page Image CheckBoxes Panel < > One CheckBox'",
" VISIBLE: '< > One CheckBox', cursor=1",
- "SPEECH OUTPUT: 'not checked'",
"SPEECH OUTPUT: 'not checked'"]))
sequence.append(KeyComboAction("Tab"))
diff --git a/test/keystrokes/java/role_radio_button.py b/test/keystrokes/java/role_radio_button.py
index beee4ea..49c8506 100644
--- a/test/keystrokes/java/role_radio_button.py
+++ b/test/keystrokes/java/role_radio_button.py
@@ -91,12 +91,8 @@ sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
sequence.append(utils.AssertPresentationAction(
"2. Select the focused radio button",
- ["BUG? - Why are we presenting the state twice?",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio One RadioButton'",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio One RadioButton'",
" VISIBLE: '&=y Radio One RadioButton', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio One RadioButton'",
- " VISIBLE: '&=y Radio One RadioButton', cursor=1",
- "SPEECH OUTPUT: 'selected'",
"SPEECH OUTPUT: 'selected'"]))
########################################################################
@@ -120,12 +116,8 @@ sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
sequence.append(utils.AssertPresentationAction(
"4. Select the focused radio button",
- ["BUG? - Why are we presenting the state twice?",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Two RadioButton'",
- " VISIBLE: '&=y Radio Two RadioButton', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Two RadioButton'",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Two RadioButton'",
" VISIBLE: '&=y Radio Two RadioButton', cursor=1",
- "SPEECH OUTPUT: 'selected'",
"SPEECH OUTPUT: 'selected'"]))
########################################################################
@@ -149,12 +141,8 @@ sequence.append(WaitAction("object:property-change:accessible-value", None,
None, pyatspi.ROLE_RADIO_BUTTON, 5000))
sequence.append(utils.AssertPresentationAction(
"6. Select the focused radio button",
- ["BUG? - Why are we presenting the state twice?",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Three RadioButton'",
- " VISIBLE: '&=y Radio Three RadioButton', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Three RadioButton'",
+ ["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Text Radio Buttons Panel Text Radio Buttons &=y Radio Three RadioButton'",
" VISIBLE: '&=y Radio Three RadioButton', cursor=1",
- "SPEECH OUTPUT: 'selected'",
"SPEECH OUTPUT: 'selected'"]))
########################################################################
@@ -192,9 +180,6 @@ sequence.append(utils.AssertPresentationAction(
"9. Select the focused radio button",
["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio One RadioButton'",
" VISIBLE: '&=y Radio One RadioButton', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio One RadioButton'",
- " VISIBLE: '&=y Radio One RadioButton', cursor=1",
- "SPEECH OUTPUT: 'selected'",
"SPEECH OUTPUT: 'selected'"]))
########################################################################
@@ -244,9 +229,6 @@ sequence.append(utils.AssertPresentationAction(
"13. Select the focused radio button",
["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Two RadioButton'",
" VISIBLE: '&=y Radio Two RadioButton', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Two RadioButton'",
- " VISIBLE: '&=y Radio Two RadioButton', cursor=1",
- "SPEECH OUTPUT: 'selected'",
"SPEECH OUTPUT: 'selected'"]))
########################################################################
@@ -284,9 +266,6 @@ sequence.append(utils.AssertPresentationAction(
"16. Select the focused radio button",
["BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Three RadioButton'",
" VISIBLE: '&=y Radio Three RadioButton', cursor=1",
- "BRAILLE LINE: 'SwingSet2 Application SwingSet2 Frame RootPane LayeredPane Button Demo TabList Button Demo Page Radio Buttons TabList Radio Buttons Page Image Radio Buttons Panel Image Radio Buttons &=y Radio Three RadioButton'",
- " VISIBLE: '&=y Radio Three RadioButton', cursor=1",
- "SPEECH OUTPUT: 'selected'",
"SPEECH OUTPUT: 'selected'"]))
# Tab back up to begining
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]