aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-11 17:31:38 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-11 17:31:38 +0800
commitcdb1098cc61e4b123bfcecb0a1bcd15b293e8aba (patch)
tree70fb94f888c84dcbe2a2e84a096a0d2744141944 /widgets
parent38e9c5626e7cc99377c62febe1d07687a084f107 (diff)
downloadgsoc2013-evolution-cdb1098cc61e4b123bfcecb0a1bcd15b293e8aba.tar.gz
gsoc2013-evolution-cdb1098cc61e4b123bfcecb0a1bcd15b293e8aba.tar.zst
gsoc2013-evolution-cdb1098cc61e4b123bfcecb0a1bcd15b293e8aba.zip
Fix a build break due to #error pragma
Diffstat (limited to 'widgets')
-rw-r--r--widgets/table/e-cell-tree.c19
1 files changed, 15 insertions, 4 deletions
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);