a11y: Split out a function

First in a set of refactorings to make the create_cell() function
actually understandable.
This commit is contained in:
Benjamin Otte 2014-02-24 14:07:57 +01:00
parent ad2f96ff48
commit 43fe3c499c

View File

@ -360,7 +360,7 @@ peek_cell (GtkTreeViewAccessible *accessible,
} }
static GtkCellAccessible * static GtkCellAccessible *
create_cell (GtkTreeView *treeview, create_cell_accessible (GtkTreeView *treeview,
GtkTreeViewAccessible *accessible, GtkTreeViewAccessible *accessible,
GtkRBTree *tree, GtkRBTree *tree,
GtkRBNode *node, GtkRBNode *node,
@ -368,9 +368,9 @@ create_cell (GtkTreeView *treeview,
{ {
GtkCellRenderer *renderer; GtkCellRenderer *renderer;
AtkObject *parent; AtkObject *parent;
GtkContainerCellAccessible *container = NULL;
GList *renderer_list; GList *renderer_list;
GList *l; GList *l;
GtkContainerCellAccessible *container = NULL;
GtkCellAccessible *cell; GtkCellAccessible *cell;
renderer_list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column)); renderer_list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
@ -418,6 +418,20 @@ create_cell (GtkTreeView *treeview,
if (container) if (container)
cell = GTK_CELL_ACCESSIBLE (container); cell = GTK_CELL_ACCESSIBLE (container);
return cell;
}
static GtkCellAccessible *
create_cell (GtkTreeView *treeview,
GtkTreeViewAccessible *accessible,
GtkRBTree *tree,
GtkRBNode *node,
GtkTreeViewColumn *column)
{
GtkCellAccessible *cell;
cell = create_cell_accessible (treeview, accessible, tree, node, column);
set_cell_data (treeview, accessible, cell); set_cell_data (treeview, accessible, cell);
_gtk_cell_accessible_update_cache (cell); _gtk_cell_accessible_update_cache (cell);