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 346685 - Table cells ATK info not always placed at correct index
Table cells ATK info not always placed at correct index
Status: RESOLVED INVALID
Product: atk
Classification: Platform
Component: gail
1.8.x
Other All
: Normal normal
: ---
Assigned To: Li Yuan
Li Yuan
Depends on: 415705
Blocks:
 
 
Reported: 2006-07-05 19:35 UTC by Brett Clippingdale
Modified: 2008-03-20 09:03 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
python code for testing this bug (5.07 KB, text/plain)
2007-06-26 09:23 UTC, Yi Jin
Details

Description Brett Clippingdale 2006-07-05 19:35:23 UTC
Please describe the problem:
When swapping rows within a table, the cells' accessible info (name/description) is placed incorrectly.  Instead of being reassigned to the new indices, it is placed at table row[0] regardless of actual index (successfully skipping table headers, but to wrong index).

The canonical approach of swapping table cells is outlined in the PyGtk FAQ:
http://www.async.com.br/faq/pygtk/index.py?req=show&file=faq13.030.htp

The approach is outlined here, an example that moves a given row up (in a single-column list):
 def button_clicked_cb(button, model):
   selection = model.get_selection()
   model, selected = selection.get_selected()
   assert not selected is None
   path = model.get_path(selected)
   row = path[0]
   assert row > 0
   this = model[row][0]
   prev = model[row-1][0]
   model[row-1][0] = this
   model[row][0] = prev
   selection.select_path(row-1)

In my tests within python storing a list of strings in a list store (the 'model), we find that 'this' and 'prev' are just strings, the names of the items in the list.  Moving them in python prevents us from knowing what happens at the gail layer, but we wouldn't be surprised if the items were not updated in ATSPI.  However, using at-poke, we find that the table items are indeed updated, but to the wrong index.

Steps to reproduce:
1. Run at-poke on an application using the code supplied above
2. Assign accessible name/description to all table row items
3. Call the method above
4. Watch as the table rows are moved, but their at-spi names/descriptions are moved to incorrect indices.  Specifically, the accessible name/desc for the item moved upwards are written to the first item in the table, regardless of where that item was moved from.


Actual results:
at-spi names/descriptions are moved to incorrect indices.  Specifically, the accessible name/desc for the item moved upwards are written to the first item in the table, regardless of where that item was moved from.


Expected results:
at-spi names/descriptions should be moved to their correct indices, matching the new displayed position of the table item.


Does this happen every time?
Yes

Other information:
Perhaps there is a issue with gailcontainercall.c::_gail_container_cell_recompute_child_indices() ??
Comment 1 Yi Jin 2007-04-24 09:26:33 UTC
Hi, Brett, I have tried the code above by changing pygtk's demo,and find nothing wrong through at-poke. i.e. I can not reproduce it. 

Would you please retry this bug again?


Comment 2 Yi Jin 2007-06-26 09:23:32 UTC
Created attachment 90648 [details]
python code for testing this bug

I use this code to test bug, and i find nothing wrong. 
Type "python listswap.py" to run it. It is modified through pygtk demo.
Please check it.
Comment 3 Peter Parente 2007-06-26 10:49:29 UTC
Adding Eitan who is probably the most familiar with atk/gtk table bugs now.
Comment 4 Li Yuan 2008-03-20 09:03:15 UTC
I am closing this bug, if problem still occurs, just re-open it.