[gtk+] a11y: Don't crete cell infos for non-children
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] a11y: Don't crete cell infos for non-children
- Date: Wed, 16 Nov 2011 03:42:50 +0000 (UTC)
commit c2410d0d04185222cb92074698d1a3ee47068802
Author: Benjamin Otte <otte redhat com>
Date: Sun Nov 13 02:47:42 2011 +0100
a11y: Don't crete cell infos for non-children
When we use a container inbetween, this ensures that the cell infos
don't replace each other in the hash table.
gtk/a11y/gtktreeviewaccessible.c | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index 51d8167..794233b 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -682,7 +682,8 @@ gtk_tree_view_accessible_ref_child (AtkObject *obj,
renderer_cell = GTK_RENDERER_CELL_ACCESSIBLE (child);
/* Create the GtkTreeViewAccessibleCellInfo for this cell */
- cell_info_new (accessible, tree_model, tree, node, tv_col, cell);
+ if (parent == ATK_OBJECT (accessible))
+ cell_info_new (accessible, tree_model, tree, node, tv_col, cell);
_gtk_cell_accessible_initialise (cell, widget, parent);
@@ -3317,8 +3318,17 @@ find_cell_info (GtkTreeViewAccessible *accessible,
GtkCellAccessible *cell,
gboolean live_only)
{
+ AtkObject *parent;
+
+ parent = atk_object_get_parent (ATK_OBJECT (cell));
+ while (parent != ATK_OBJECT (accessible))
+ {
+ cell = GTK_CELL_ACCESSIBLE (parent);
+ parent = atk_object_get_parent (ATK_OBJECT (cell));
+ }
+
return g_object_get_qdata (G_OBJECT (cell),
- gtk_tree_view_accessible_get_data_quark ());
+ gtk_tree_view_accessible_get_data_quark ());
}
static AtkObject *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]