forked from AuroraMiddleware/gtk
a11y: Compute the cell index quicker
We have the node available, so we can compute it from there.
This commit is contained in:
parent
a890a61253
commit
104ddf8a6d
@ -3018,17 +3018,11 @@ static int
|
|||||||
cell_info_get_index (GtkTreeView *tree_view,
|
cell_info_get_index (GtkTreeView *tree_view,
|
||||||
GtkTreeViewAccessibleCellInfo *info)
|
GtkTreeViewAccessibleCellInfo *info)
|
||||||
{
|
{
|
||||||
GtkTreePath *path;
|
|
||||||
gint column_number;
|
|
||||||
int index;
|
int index;
|
||||||
|
|
||||||
path = cell_info_get_path (info);
|
index = _gtk_rbtree_node_get_index (info->tree, info->node) + 1;
|
||||||
if (!path)
|
index *= info->view->n_cols;
|
||||||
return -1;
|
index += get_column_number (tree_view, info->cell_col_ref, FALSE);
|
||||||
|
|
||||||
column_number = get_column_number (tree_view, info->cell_col_ref, FALSE);
|
|
||||||
index = get_index (tree_view, path, column_number);
|
|
||||||
gtk_tree_path_free (path);
|
|
||||||
|
|
||||||
return index;
|
return index;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user