a11y: Add a special-case for cell index querying

I could have tried to make GtkContainerCellAccessible implement
GtkCellAccessibleParent, but the current implementation of that
interface doesn't make sense for it.
This commit is contained in:
Benjamin Otte
2011-11-11 01:25:09 +01:00
parent 02fd1e5a62
commit 533ee181de
2 changed files with 5 additions and 25 deletions

View File

@ -95,6 +95,11 @@ gtk_cell_accessible_get_index_in_parent (AtkObject *obj)
int index;
cell = GTK_CELL_ACCESSIBLE (obj);
parent = atk_object_get_parent (obj);
if (GTK_IS_CONTAINER_CELL_ACCESSIBLE (parent))
return g_list_index (GTK_CONTAINER_CELL_ACCESSIBLE (parent)->children, obj);
parent = gtk_widget_get_accessible (cell->widget);
if (parent == NULL)
return -1;