GNOME Bugzilla – Bug 350218
GtkDemo Editable cells tree demo seems to be speaking both cells in a row
Last modified: 2006-08-10 16:51:13 UTC
GtkDemo Editable cells tree demo seems to be speaking both cells in a row - looks like we might be getting some extra events active descendant changed events from AT-SPI? Also see this in the list store demo. It looks like it speaks the first column header the cell in the first column and then the focused column header and the focused column cell when going up/down and "read cell" is turned on. [Tested by Will with the CVS equivalent of Orca 0.2.8 on Ubuntu Dapper Drake v6.06].
Something definitely seems wrong here. If I recall correctly, Rich and I ran into this earlier this summer, and the problem was that Orca was receiving multiple selection and/or active descendant changed events for the table.
As a sanity check, I ran both examples (GtkDemo Editable cells tree demo and the list store demo) against a version of Orca with a default.py from before the recent changes to onSelectionChanged (see bug #347691). Comments here are for when we are reading single table cells (rather than reading the whole row). Toggles with Insert-F11. For the editable cells tree demo, the old version correctly just spoke the table cell for the focused item (prepending the column header if the column had just changed). The latest version always speaks the first column header, the first column table cell then if the focus is on a different column, that column header and that focused cell. If the focus is in the first column, then the column header and table cell are only spoken once. Similar results for the list store demo. There is definitely a regression based on the onSelectionChanged() changes. Investigating further...
With the Tree View Editable Cells demo (speaking by cell rather than row), with the focus in the Product column and initially on the "packages of noodles" table cell, we are getting the following events when we move Down to the next row ("packages of chocolate chip cookies"): ----------------------------------------------------------------------------- OBJECT EVENT: object:state-changed:selected detail=(0,0) app.name='gtk-demo' name='5' role='table cell' state='ENABLED FOCUSABLE SELECTABLE SENSITIVE SHOWING SINGLE_LINE TRANSIENT VISIBLE' ----------------------------------------------------------------------------- OBJECT EVENT: object:state-changed:selected detail=(1,0) app.name='gtk-demo' name='2' role='table cell' state='ENABLED FOCUSABLE SELECTABLE SELECTED SENSITIVE SHOWING SINGLE_LINE TRANSIENT VISIBLE' ----------------------------------------------------------------------------- OBJECT EVENT: object:state-changed:selected detail=(1,0) app.name='gtk-demo' name='packages of chocolate chip cookies' role='table cell' state='ENABLED FOCUSABLE SELECTABLE SELECTED SENSITIVE SHOWING SINGLE_LINE TRANSIENT VISIBLE' ----------------------------------------------------------------------------- OBJECT EVENT: object:state-changed:selected detail=(0,0) app.name='gtk-demo' name='packages of noodles' role='table cell' state='ENABLED FOCUSABLE SELECTABLE SENSITIVE SHOWING SINGLE_LINE TRANSIENT VISIBLE' ----------------------------------------------------------------------------- OBJECT EVENT: object:state-changed:selected detail=(0,0) app.name='gtk-demo' name=None role='table cell' state='ENABLED FOCUSABLE SELECTABLE SENSITIVE SHOWING TRANSIENT VISIBLE' ----------------------------------------------------------------------------- OBJECT EVENT: object:selection-changed detail=(0,0) app.name='gtk-demo' name=None role='table' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' LOCUS OF FOCUS: app='gtk-demo' name='2' role='table cell' event='object:selection-changed' ... BRAILLE LINE: 'gtk-demo Application Shopping list Frame ScrollPane Table Number ColumnHeader 2 Cell' VISIBLE: '2 Cell', cursor=1 ... GENERATOR: _getSpeechForTableCell obj = 2 role = table cell already_focused = False utterances: (2) SPEECH OUTPUT: '' SPEECH OUTPUT: '2' ----------------------------------------------------------------------------- OBJECT EVENT: object:active-descendant-changed detail=(10,0) app.name='gtk-demo' name=None role='table' state='ENABLED FOCUSABLE FOCUSED SENSITIVE SHOWING VISIBLE MANAGES_DESCENDANTS' LOCUS OF FOCUS: app='gtk-demo' name='packages of chocolate chip cookies' role='table cell' event='object:active-descendant-changed' ... BRAILLE LINE: 'gtk-demo Application Shopping list Frame ScrollPane Table Product ColumnHeader packages of chocolate chip cookies Cell' VISIBLE: 'packages of chocolate chip cooki', cursor=1 ... GENERATOR: _getSpeechForTableCell obj = packages of chocolate chip cookies role = table cell already_focused = False utterances: (packages of chocolate chip cookies) SPEECH OUTPUT: '' SPEECH OUTPUT: 'Product column header' SPEECH OUTPUT: 'packages of chocolate chip cookies' ----------------------------------------------------------------------------- In short, the "object:selection-changed" event reads of the the tables cells and the "object:active-descendant-changed" event reads the other.
Created attachment 70562 [details] [review] Patch to hopefully fix the problem. Will noticed that the old code in processObjectEvent() in default.py had a section where you should avoid handling "object:selection-changed" events with objects that manage their descendants because they'll issue an active descendant changed event. This patch adds that logic into the onSelectionChanged() routine. It seems to nicely solve the problem. Could others please test it and give me feedback before I check it in. Thanks.
Changed checked into CVS HEAD. Closing as FIXED.