[gtk+] a11y: implement widget_(un)set in ContainerCell
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: implement widget_(un)set in ContainerCell
- Date: Mon, 19 Dec 2011 15:51:37 +0000 (UTC)
commit 3d4a8dabb242679c59398f46cf847aa5bc9d7704
Author: Benjamin Otte <otte redhat com>
Date: Sun Dec 18 21:07:27 2011 +0100
a11y: implement widget_(un)set in ContainerCell
gtk/a11y/gtkcontainercellaccessible.c | 32 ++++++++++++++++++++++++++++++++
1 files changed, 32 insertions(+), 0 deletions(-)
---
diff --git a/gtk/a11y/gtkcontainercellaccessible.c b/gtk/a11y/gtkcontainercellaccessible.c
index 1f37e04..ad90de2 100644
--- a/gtk/a11y/gtkcontainercellaccessible.c
+++ b/gtk/a11y/gtkcontainercellaccessible.c
@@ -72,9 +72,38 @@ 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]