[evolution/wip/gsettings] Fix a build break due to #error pragma



commit fdffa9ec4a5749ae0969c96b927c09eb4599b70f
Author: Milan Crha <mcrha redhat com>
Date:   Fri Feb 11 10:31:38 2011 +0100

    Fix a build break due to #error pragma

 widgets/table/e-cell-tree.c |   19 +++++++++++++++----
 1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c
index 6a277fc..467523d 100644
--- a/widgets/table/e-cell-tree.c
+++ b/widgets/table/e-cell-tree.c
@@ -669,10 +669,21 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context,
 
 		/* now draw our icon if we're expandable */
 		if (expandable) {
-#if GTK_CHECK_VERSION (3, 0, 0)
-			gboolean expanded = e_tree_table_adapter_node_is_expanded (tree_table_adapter, node);
-#error Paint an expander here
-#endif
+			gboolean expanded;
+			GdkRectangle r;
+			gint exp_size = 0;
+
+			gtk_widget_style_get (GTK_WIDGET (gtk_widget_get_parent (GTK_WIDGET (tree_view->canvas))), "expander_size", &exp_size, NULL);
+
+			node = e_cell_tree_get_node (ecell_view->e_table_model, row);
+			expanded = e_tree_table_adapter_node_is_expanded (tree_table_adapter, node);
+
+			r.x = 0;
+			r.y = 0;
+			r.width = MIN (width, exp_size);
+			r.height = height;
+
+			draw_expander (tree_view, cr, expanded ? GTK_EXPANDER_EXPANDED : GTK_EXPANDER_COLLAPSED, GTK_STATE_NORMAL, &r);
 		}
 
 		cairo_stroke (cr);



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