From 35b667a409c245e049f80d5d1ad16da1c7f48cb4 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 11 Nov 2011 02:48:40 +0100 Subject: [PATCH] a11y: Implement get_child_index in treeview --- gtk/a11y/gtktreeviewaccessible.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c index deb1f175de..6d9870e6ea 100644 --- a/gtk/a11y/gtktreeviewaccessible.c +++ b/gtk/a11y/gtktreeviewaccessible.c @@ -91,6 +91,8 @@ static void iterate_thru_children (GtkTreeView GtkTreePath *orig, gint *count, gint depth); +static int cell_info_get_index (GtkTreeView *tree_view, + GtkTreeViewAccessibleCellInfo *info); static void clean_rows (GtkTreeViewAccessible *tree_view); static void clean_cols (GtkTreeViewAccessible *tree_view, GtkTreeViewColumn *tv_col); @@ -1527,16 +1529,19 @@ gtk_tree_view_accessible_grab_cell_focus (GtkCellAccessibleParent *parent, } static int -gtk_cell_accessible_parent_get_child_index (GtkCellAccessibleParent *parent, - GtkCellAccessible *cell) +gtk_tree_view_accessible_get_child_index (GtkCellAccessibleParent *parent, + GtkCellAccessible *cell) { GtkTreeViewAccessibleCellInfo *cell_info; + GtkTreeView *tree_view; cell_info = find_cell_info (GTK_TREE_VIEW_ACCESSIBLE (parent), cell, TRUE); if (!cell_info || !cell_info->cell_col_ref || !cell_info->cell_row_ref) return -1; - return cell_info_get_index (tree_view, info); + tree_view = GTK_TREE_VIEW (gtk_accessible_get_widget (GTK_ACCESSIBLE (parent))); + + return cell_info_get_index (tree_view, cell_info); } static void