[gtk+] treeview: Set the new flags when rendering the cell



commit 175043bd8df2e9f3bca5068fd1b9ebe3cbcbbb0d
Author: Benjamin Otte <otte redhat com>
Date:   Sun Dec 11 02:52:26 2011 +0100

    treeview: Set the new flags when rendering the cell

 gtk/gtktreeview.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/gtk/gtktreeview.c b/gtk/gtktreeview.c
index d0baa45..831fe8e 100644
--- a/gtk/gtktreeview.c
+++ b/gtk/gtktreeview.c
@@ -4892,6 +4892,16 @@ gtk_tree_view_bin_draw (GtkWidget      *widget,
           else
             flags &= ~GTK_CELL_RENDERER_FOCUSED;
 
+          if (GTK_RBNODE_FLAG_SET (node, GTK_RBNODE_IS_PARENT))
+            flags |= GTK_CELL_RENDERER_EXPANDABLE;
+          else
+            flags &= ~GTK_CELL_RENDERER_EXPANDABLE;
+
+          if (node->children)
+            flags |= GTK_CELL_RENDERER_EXPANDED;
+          else
+            flags &= ~GTK_CELL_RENDERER_EXPANDED;
+
 	  background_area.x = cell_offset;
 	  background_area.width = width;
 



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