mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-17 14:30:15 +00:00
a11y: Split out a function
First in a set of refactorings to make the create_cell() function actually understandable.
This commit is contained in:
parent
ad2f96ff48
commit
43fe3c499c
@ -360,17 +360,17 @@ 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,
|
||||||
GtkTreeViewColumn *column)
|
GtkTreeViewColumn *column)
|
||||||
{
|
{
|
||||||
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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user