[gtk+] a11y: Split out a function



commit 43fe3c499c4e00a37c29033984b7dfca4f50b401
Author: Benjamin Otte <otte redhat com>
Date:   Mon Feb 24 14:07:57 2014 +0100

    a11y: Split out a function
    
    First in a set of refactorings to make the create_cell() function
    actually understandable.

 gtk/a11y/gtktreeviewaccessible.c |   26 ++++++++++++++++++++------
 1 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/gtk/a11y/gtktreeviewaccessible.c b/gtk/a11y/gtktreeviewaccessible.c
index a3a1120..b2b29f2 100644
--- a/gtk/a11y/gtktreeviewaccessible.c
+++ b/gtk/a11y/gtktreeviewaccessible.c
@@ -360,17 +360,17 @@ peek_cell (GtkTreeViewAccessible *accessible,
 }
 
 static GtkCellAccessible *
-create_cell (GtkTreeView           *treeview,
-             GtkTreeViewAccessible *accessible,
-             GtkRBTree             *tree,
-             GtkRBNode             *node,
-             GtkTreeViewColumn     *column)
+create_cell_accessible (GtkTreeView           *treeview,
+                        GtkTreeViewAccessible *accessible,
+                        GtkRBTree             *tree,
+                        GtkRBNode             *node,
+                        GtkTreeViewColumn     *column)
 {
   GtkCellRenderer *renderer;
   AtkObject *parent;
+  GtkContainerCellAccessible *container = NULL;
   GList *renderer_list;
   GList *l;
-  GtkContainerCellAccessible *container = NULL;
   GtkCellAccessible *cell;
 
   renderer_list = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (column));
@@ -418,6 +418,20 @@ create_cell (GtkTreeView           *treeview,
   if (container)
     cell = GTK_CELL_ACCESSIBLE (container);
 
+  return cell;
+}
+                        
+static GtkCellAccessible *
+create_cell (GtkTreeView           *treeview,
+             GtkTreeViewAccessible *accessible,
+             GtkRBTree             *tree,
+             GtkRBNode             *node,
+             GtkTreeViewColumn     *column)
+{
+  GtkCellAccessible *cell;
+
+  cell = create_cell_accessible (treeview, accessible, tree, node, column);
+
   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]