[gtk+] a11y: Split out creation of cell info



commit f60bb84d159853f15f3eae9027693274a6f03112
Author: Benjamin Otte <otte redhat com>
Date:   Mon Feb 24 14:17:28 2014 +0100

    a11y: Split out creation of cell info
    
    Don't mix cell info creation with cell accessible creation. Instead,
    first create the accessible, then create the cell info.

 gtk/a11y/gtktreeviewaccessible.c |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index b2b29f2..e8bd1d1 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -362,8 +362,6 @@ peek_cell (GtkTreeViewAccessible *accessible,
 static GtkCellAccessible *
 create_cell_accessible (GtkTreeView           *treeview,
                         GtkTreeViewAccessible *accessible,
-                        GtkRBTree             *tree,
-                        GtkRBNode             *node,
                         GtkTreeViewColumn     *column)
 {
   GtkCellRenderer *renderer;
@@ -387,11 +385,6 @@ create_cell_accessible (GtkTreeView           *treeview,
       container_cell = GTK_CELL_ACCESSIBLE (container);
       _gtk_cell_accessible_initialize (container_cell, GTK_WIDGET (treeview), ATK_OBJECT (accessible));
 
-      /* The GtkTreeViewAccessibleCellInfo structure for the container will
-       * be before the ones for the cells so that the first one we find for
-       * a position will be for the container
-       */
-      cell_info_new (accessible, tree, node, column, container_cell);
       parent = ATK_OBJECT (container);
     }
   else
@@ -404,11 +397,6 @@ create_cell_accessible (GtkTreeView           *treeview,
       renderer = GTK_CELL_RENDERER (l->data);
 
       cell = GTK_CELL_ACCESSIBLE (gtk_renderer_cell_accessible_new (renderer));
-
-      /* Create the GtkTreeViewAccessibleCellInfo for this cell */
-      if (parent == ATK_OBJECT (accessible))
-        cell_info_new (accessible, tree, node, column, cell);
-
       _gtk_cell_accessible_initialize (cell, GTK_WIDGET (treeview), parent);
 
       if (container)
@@ -430,7 +418,8 @@ create_cell (GtkTreeView           *treeview,
 {
   GtkCellAccessible *cell;
 
-  cell = create_cell_accessible (treeview, accessible, tree, node, column);
+  cell = create_cell_accessible (treeview, accessible, column);
+  cell_info_new (accessible, tree, node, column, cell);
 
   set_cell_data (treeview, accessible, cell);
   _gtk_cell_accessible_update_cache (cell);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]