a11y: Use the accessible type

This commit is contained in:
Benjamin Otte 2011-12-15 19:16:43 +01:00
parent 0470b91add
commit e5d5863a3f
3 changed files with 11 additions and 9 deletions

View File

@ -118,15 +118,16 @@ _gtk_renderer_cell_accessible_update_cache (GtkRendererCellAccessible *cell,
}
AtkObject *
_gtk_renderer_cell_accessible_new (void)
_gtk_renderer_cell_accessible_new (GtkCellRenderer *renderer)
{
GObject *object;
AtkObject *atk_object;
AtkObject *object;
object = g_object_new (GTK_TYPE_RENDERER_CELL_ACCESSIBLE, NULL);
g_return_val_if_fail (GTK_IS_CELL_RENDERER (renderer), NULL);
atk_object = ATK_OBJECT (object);
atk_object->role = ATK_ROLE_TABLE_CELL;
object = g_object_new (_gtk_cell_renderer_get_accessible_type (renderer),
NULL);
return atk_object;
atk_object_set_role (object, ATK_ROLE_TABLE_CELL);
return object;
}

View File

@ -51,7 +51,8 @@ struct _GtkRendererCellAccessibleClass
GType _gtk_renderer_cell_accessible_get_type (void);
AtkObject *_gtk_renderer_cell_accessible_new (void);
AtkObject *_gtk_renderer_cell_accessible_new (GtkCellRenderer * renderer);
gboolean _gtk_renderer_cell_accessible_update_cache (GtkRendererCellAccessible *cell,
gboolean emit_change_signal);

View File

@ -462,7 +462,7 @@ gtk_tree_view_accessible_ref_child (AtkObject *obj,
else if (GTK_IS_CELL_RENDERER_PIXBUF (renderer))
child = _gtk_image_cell_accessible_new ();
else
child = _gtk_renderer_cell_accessible_new ();
child = _gtk_renderer_cell_accessible_new (renderer);
cell = GTK_CELL_ACCESSIBLE (child);
renderer_cell = GTK_RENDERER_CELL_ACCESSIBLE (child);