From cdb1098cc61e4b123bfcecb0a1bcd15b293e8aba Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 11 Feb 2011 10:31:38 +0100 Subject: Fix a build break due to #error pragma --- widgets/table/e-cell-tree.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'widgets') diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index 6a277fcce3..467523d6d7 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); -- cgit