[gtk+] a11y: Use the accessible type
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Use the accessible type
- Date: Fri, 16 Dec 2011 03:59:09 +0000 (UTC)
commit e5d5863a3f6568544acb66d6f384deabdf6a8e43
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 15 19:16:43 2011 +0100
a11y: Use the accessible type
gtk/a11y/gtkrenderercellaccessible.c | 15 ++++++++-------
gtk/a11y/gtkrenderercellaccessible.h | 3 ++-
gtk/a11y/gtktreeviewaccessible.c | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)
---
diff --git a/gtk/a11y/gtkrenderercellaccessible.c b/gtk/a11y/gtkrenderercellaccessible.c
index f494949..2318f9c 100644
--- a/gtk/a11y/gtkrenderercellaccessible.c
+++ b/gtk/a11y/gtkrenderercellaccessible.c
@@ -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;
}
diff --git a/gtk/a11y/gtkrenderercellaccessible.h b/gtk/a11y/gtkrenderercellaccessible.h
index d9d8790..6d11538 100644
--- a/gtk/a11y/gtkrenderercellaccessible.h
+++ b/gtk/a11y/gtkrenderercellaccessible.h
@@ -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);
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 93921f6..4da3fff 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]