aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-11 17:31:38 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:32 +0800
commitfdffa9ec4a5749ae0969c96b927c09eb4599b70f (patch)
treec82d3127592aecfe2033dc65f5c7650e365f39a8 /widgets/table
parent9fef76c5ca9b46528c2a9497a8595d0e592fcc1b (diff)
downloadgsoc2013-evolution-fdffa9ec4a5749ae0969c96b927c09eb4599b70f.tar
gsoc2013-evolution-fdffa9ec4a5749ae0969c96b927c09eb4599b70f.tar.gz
gsoc2013-evolution-fdffa9ec4a5749ae0969c96b927c09eb4599b70f.tar.bz2
gsoc2013-evolution-fdffa9ec4a5749ae0969c96b927c09eb4599b70f.tar.lz
gsoc2013-evolution-fdffa9ec4a5749ae0969c96b927c09eb4599b70f.tar.xz
gsoc2013-evolution-fdffa9ec4a5749ae0969c96b927c09eb4599b70f.tar.zst
gsoc2013-evolution-fdffa9ec4a5749ae0969c96b927c09eb4599b70f.zip
Fix a build break due to #error pragma
Diffstat (limited to 'widgets/table')
-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);