diff options
author | Benjamin Otte <otte@redhat.com> | 2014-02-24 18:02:41 +0100 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2014-02-26 02:36:08 +0100 |
commit | 5ea4dbf3e06a2d5003b2351eff3607c7a64169ce (patch) | |
tree | b51b6bb6627d64d767b4338e6231af756413a7e0 /gtk/a11y | |
parent | 70ff97e812e5b96b503dcc542eefac899f7c9131 (diff) | |
download | gtk+-5ea4dbf3e06a2d5003b2351eff3607c7a64169ce.tar.gz |
a11y: Split out a function
This will make the next refactoring easier.
Diffstat (limited to 'gtk/a11y')
-rw-r--r-- | gtk/a11y/gtktreeviewaccessible.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c index 81f55ea1e5..80312da392 100644 --- a/gtk/a11y/gtktreeviewaccessible.c +++ b/gtk/a11y/gtktreeviewaccessible.c @@ -360,11 +360,24 @@ peek_cell (GtkTreeViewAccessible *accessible, } static GtkCellAccessible * +create_cell_accessible_for_renderer (GtkCellRenderer *renderer, + GtkWidget *widget, + AtkObject *parent) +{ + GtkCellAccessible *cell; + + cell = GTK_CELL_ACCESSIBLE (gtk_renderer_cell_accessible_new (renderer)); + + _gtk_cell_accessible_initialize (cell, widget, parent); + + return cell; +} + +static GtkCellAccessible * create_cell_accessible (GtkTreeView *treeview, GtkTreeViewAccessible *accessible, GtkTreeViewColumn *column) { - GtkCellRenderer *renderer; AtkObject *parent; GtkContainerCellAccessible *container = NULL; GList *renderer_list; @@ -390,11 +403,7 @@ create_cell_accessible (GtkTreeView *treeview, for (l = renderer_list; l; l = l->next) { - renderer = GTK_CELL_RENDERER (l->data); - - cell = GTK_CELL_ACCESSIBLE (gtk_renderer_cell_accessible_new (renderer)); - _gtk_cell_accessible_initialize (cell, GTK_WIDGET (treeview), parent); - + cell = create_cell_accessible_for_renderer (l->data, GTK_WIDGET (treeview), parent); if (container) gtk_container_cell_accessible_add_child (container, cell); } |