After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 350218 - GtkDemo Editable cells tree demo seems to be speaking both cells in a row
GtkDemo Editable cells tree demo seems to be speaking both cells in a row
Status: RESOLVED FIXED
Product: orca
Classification: Applications
Component: general
0.2.x
Other All
: Normal normal
: ---
Assigned To: Orca Maintainers
Orca Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-07 01:39 UTC by Rich Burridge
Modified: 2006-08-10 16:51 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Patch to hopefully fix the problem. (756 bytes, patch)
2006-08-09 16:37 UTC, Rich Burridge
none Details | Review

Description Rich Burridge 2006-08-07 01:39:01 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].
Comment 1 Willie Walker 2006-08-07 13:33:30 UTC
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.
Comment 2 Rich Burridge 2006-08-08 17:41:58 UTC
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...
Comment 3 Rich Burridge 2006-08-08 19:07:40 UTC
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.


Comment 4 Rich Burridge 2006-08-09 16:37:17 UTC
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.
Comment 5 Rich Burridge 2006-08-10 16:51:13 UTC
Changed checked into CVS HEAD. Closing as FIXED.