aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@ximian.com>2003-05-22 00:02:59 +0800
committerMike Kestner <mkestner@src.gnome.org>2003-05-22 00:02:59 +0800
commit3c4aef5b41d983c9b424276c880787c868b77e44 (patch)
treef46810079db6f4be0551a62cf606d0a93d756622 /widgets/table/e-tree.c
parentda19eca34ec7abe7cce7772bfa9d7bed2e8a0b29 (diff)
downloadgsoc2013-evolution-3c4aef5b41d983c9b424276c880787c868b77e44.tar.gz
gsoc2013-evolution-3c4aef5b41d983c9b424276c880787c868b77e44.tar.zst
gsoc2013-evolution-3c4aef5b41d983c9b424276c880787c868b77e44.zip
to really fix 42952 use e_table_item_get_cell_geometry. Also a couple
2003-05-20 Ettore Perazzoli <ettore@ximian.com> * e-tree.c (tree_canvas_size_allocate): to really fix 42952 use e_table_item_get_cell_geometry. Also a couple valgrind and g_warning fixes related to this change from Mike. svn path=/trunk/; revision=21303
Diffstat (limited to 'widgets/table/e-tree.c')
-rw-r--r--widgets/table/e-tree.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 0a13f64c50..5e2fcef6e9 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -776,10 +776,15 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc,
g_source_remove(e_tree->priv->reflow_idle_id);
tree_canvas_reflow_idle(e_tree);
- if (path)
- e_tree_get_cell_geometry (e_tree, e_tree_row_of_node(e_tree, path), 0, &x, &y, &w, &h);
- else
- y = h = 0;
+ x = y = w = h = 0;
+ if (path) {
+ int row = e_tree_row_of_node(e_tree, path);
+ int col = 0;
+
+ if (row >= 0)
+ e_table_item_get_cell_geometry (E_TABLE_ITEM (e_tree->priv->item),
+ &row, &col, &x, &y, &w, &h);
+ }
if (y < adj->value || y + h > adj->value + adj->page_size)
gtk_adjustment_set_value(adj, CLAMP(y - adj->page_size / 2, adj->lower, adj->upper - adj->page_size));