a11y: Change function declaration

Returning an int seems way easier than having an int out argument to a
void function. Also, it doesn't lead to uninitialized memory, what a
concept!
This commit is contained in:
Benjamin Otte
2011-11-11 01:35:50 +01:00
parent 533ee181de
commit ac29108586

View File

@ -3160,21 +3160,23 @@ cell_destroyed (gpointer data)
} }
} }
static void static int
cell_info_get_index (GtkTreeView *tree_view, cell_info_get_index (GtkTreeView *tree_view,
GtkTreeViewAccessibleCellInfo *info, GtkTreeViewAccessibleCellInfo *info)
gint *index)
{ {
GtkTreePath *path; GtkTreePath *path;
gint column_number; gint column_number;
int index;
path = gtk_tree_row_reference_get_path (info->cell_row_ref); path = gtk_tree_row_reference_get_path (info->cell_row_ref);
if (!path) if (!path)
return; return -1;
column_number = 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); index = get_index (tree_view, path, column_number);
gtk_tree_path_free (path); gtk_tree_path_free (path);
return index;
} }
static void static void
@ -3234,7 +3236,7 @@ refresh_cell_index (GtkCellAccessible *cell)
if (!info) if (!info)
return; return;
cell_info_get_index (tree_view, info, &index); index = cell_info_get_index (tree_view, info);
cell->index = index; cell->index = index;
g_hash_table_insert (accessible->cell_info_by_index, &index, info); g_hash_table_insert (accessible->cell_info_by_index, &index, info);
} }