diff options
author | Benjamin Otte <otte@redhat.com> | 2011-11-10 22:07:19 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2011-11-16 04:31:06 +0100 |
commit | 02fd1e5a6260d8f74977a56f311be117b5417d38 (patch) | |
tree | febf346b6417d2311447774e16d6f18304d26ee3 /gtk/a11y/gtkcellaccessible.c | |
parent | 2bd69cbf8c4eda845eeac205cc5132c6bf2b8565 (diff) | |
download | gtk+-02fd1e5a6260d8f74977a56f311be117b5417d38.tar.gz |
a11y: Add _gtk_cell_accessible_parent_get_child_index()
This will soon replace the shenanigans we do to keep the index of cells
current.
Diffstat (limited to 'gtk/a11y/gtkcellaccessible.c')
-rw-r--r-- | gtk/a11y/gtkcellaccessible.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gtk/a11y/gtkcellaccessible.c b/gtk/a11y/gtkcellaccessible.c index 93f0ebe771..54bd1adf47 100644 --- a/gtk/a11y/gtkcellaccessible.c +++ b/gtk/a11y/gtkcellaccessible.c @@ -91,8 +91,18 @@ static gint gtk_cell_accessible_get_index_in_parent (AtkObject *obj) { GtkCellAccessible *cell; + AtkObject *parent; + int index; cell = GTK_CELL_ACCESSIBLE (obj); + parent = gtk_widget_get_accessible (cell->widget); + if (parent == NULL) + return -1; + + index = _gtk_cell_accessible_parent_get_child_index (GTK_CELL_ACCESSIBLE_PARENT (parent), cell); + if (index >= 0) + return index; + if (atk_state_set_contains_state (cell->state_set, ATK_STATE_STALE) && cell->refresh_index != NULL) { |