aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-text.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-05 21:27:03 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-05 21:27:03 +0800
commit9a92cc103a4cb253f7c9c86a2195ed6c01361e2d (patch)
treeda2fc6200f129fae6205e1655a07653a9b142c32 /widgets/table/e-cell-text.c
parentcc3e486ed62270d66522dfc0c9d325dd95364b7d (diff)
downloadgsoc2013-evolution-9a92cc103a4cb253f7c9c86a2195ed6c01361e2d.tar.gz
gsoc2013-evolution-9a92cc103a4cb253f7c9c86a2195ed6c01361e2d.tar.zst
gsoc2013-evolution-9a92cc103a4cb253f7c9c86a2195ed6c01361e2d.zip
Adapted height method to deal with a row of -1.
2001-10-05 Christopher James Lahey <clahey@ximian.com> * e-cell-text, e-cell-pixbuf: Adapted height method to deal with a row of -1. * e-table-group-container.c, e-table-group-container.h, e-table-group-leaf.c, e-table-group-leaf.h, e-table-item.c, e-table-item.h, e-table.c, e-table.h, e-tree.c: Added "uniform_row_height" argument. svn path=/trunk/; revision=13440
Diffstat (limited to 'widgets/table/e-cell-text.c')
-rw-r--r--widgets/table/e-cell-text.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index ded6e93c0d..0de114d2ab 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -926,9 +926,13 @@ ect_height (ECellView *ecell_view, int model_col, int view_col, int row)
font = text_view->font;
- string = ect_get_text(ect, ecell_view->e_table_model, model_col, row);
- value = e_font_height (font) * number_of_lines(string) + TEXT_PAD;
- ect_free_text(ect, string);
+ if (row == -1) {
+ value = e_font_height (font) + TEXT_PAD;
+ } else {
+ string = ect_get_text(ect, ecell_view->e_table_model, model_col, row);
+ value = e_font_height (font) * number_of_lines(string) + TEXT_PAD;
+ ect_free_text(ect, string);
+ }
return value;
}