forked from AuroraMiddleware/gtk
a11y: implement widget_(un)set in ContainerCell
This commit is contained in:
parent
d2a58446ea
commit
3d4a8dabb2
@ -71,10 +71,39 @@ gtk_container_cell_accessible_update_cache (GtkCellAccessible *cell)
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_container_cell_widget_set (GtkAccessible *accessible)
|
||||
{
|
||||
GtkContainerCellAccessible *container = GTK_CONTAINER_CELL_ACCESSIBLE (accessible);
|
||||
GList *l;
|
||||
|
||||
for (l = container->children; l; l = l->next)
|
||||
{
|
||||
gtk_accessible_set_widget (l->data, gtk_accessible_get_widget (accessible));
|
||||
}
|
||||
|
||||
GTK_ACCESSIBLE_CLASS (_gtk_container_cell_accessible_parent_class)->widget_unset (accessible);
|
||||
}
|
||||
|
||||
static void
|
||||
gtk_container_cell_widget_unset (GtkAccessible *accessible)
|
||||
{
|
||||
GtkContainerCellAccessible *container = GTK_CONTAINER_CELL_ACCESSIBLE (accessible);
|
||||
GList *l;
|
||||
|
||||
for (l = container->children; l; l = l->next)
|
||||
{
|
||||
gtk_accessible_set_widget (l->data, NULL);
|
||||
}
|
||||
|
||||
GTK_ACCESSIBLE_CLASS (_gtk_container_cell_accessible_parent_class)->widget_unset (accessible);
|
||||
}
|
||||
|
||||
static void
|
||||
_gtk_container_cell_accessible_class_init (GtkContainerCellAccessibleClass *klass)
|
||||
{
|
||||
GtkCellAccessibleClass *cell_class = GTK_CELL_ACCESSIBLE_CLASS (klass);
|
||||
GtkAccessibleClass *accessible_class = GTK_ACCESSIBLE_CLASS (klass);
|
||||
AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
|
||||
GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
@ -83,6 +112,9 @@ _gtk_container_cell_accessible_class_init (GtkContainerCellAccessibleClass *klas
|
||||
class->get_n_children = gtk_container_cell_accessible_get_n_children;
|
||||
class->ref_child = gtk_container_cell_accessible_ref_child;
|
||||
|
||||
accessible_class->widget_unset = gtk_container_cell_widget_set;
|
||||
accessible_class->widget_unset = gtk_container_cell_widget_unset;
|
||||
|
||||
cell_class->update_cache = gtk_container_cell_accessible_update_cache;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user