aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/e-table')
-rw-r--r--widgets/e-table/ChangeLog6
-rw-r--r--widgets/e-table/e-table-item.c13
2 files changed, 17 insertions, 2 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog
index 5e247bf5b5..0d1d829be1 100644
--- a/widgets/e-table/ChangeLog
+++ b/widgets/e-table/ChangeLog
@@ -1,3 +1,9 @@
+2000-04-23 Iain Holmes <ih@csd.abdn.ac.uk>
+
+ * e-table-item.c (eti_bounds): Calculate the width of the table from the
+ width of all the columns, and update the eti->width field as appropiate.
+ (eti_update): Update the bbox.
+
2000-04-17 Chris Toshok <toshok@helixcode.com>
* Makefile.am (noinst_PROGRAMS): add table-size-test
diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c
index 0b8c106a27..6c0a05db40 100644
--- a/widgets/e-table/e-table-item.c
+++ b/widgets/e-table/e-table-item.c
@@ -139,12 +139,20 @@ eti_bounds (GnomeCanvasItem *item, double *x1, double *y1, double *x2, double *y
{
double i2c [6];
ArtPoint c1, c2, i1, i2;
+ int col, width = 0;
ETableItem *eti = E_TABLE_ITEM (item);
/* Wrong BBox's are the source of redraw nightmares */
- gnome_canvas_item_i2c_affine (GNOME_CANVAS_ITEM (eti), i2c);
+ for (col = 0; col < eti->cols; col++, x1 = x2){
+ ETableCol *ecol = e_table_header_get_column (eti->header, col);
+
+ width += ecol->width;
+ }
+ eti->width = width;
+ gnome_canvas_item_i2c_affine (GNOME_CANVAS_ITEM (eti), i2c);
+
i1.x = eti->x1;
i1.y = eti->y1;
i2.x = eti->x1 + eti->width;
@@ -188,7 +196,6 @@ eti_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
if (GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->update)
(*GNOME_CANVAS_ITEM_CLASS (eti_parent_class)->update)(item, affine, clip_path, flags);
-
o1.x = item->x1;
o1.y = item->y1;
o2.x = item->x2;
@@ -208,6 +215,8 @@ eti_update (GnomeCanvasItem *item, double *affine, ArtSVP *clip_path, int flags)
item->x2, item->y2);
eti->needs_redraw = 0;
}
+ gnome_canvas_update_bbox (item, item->x1, item->y1,
+ item->x2, item->y2);
}
/*