From d4be90f9b25a398cafa91adec4098847ee4198cf Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 13 Feb 2001 23:15:13 +0000 Subject: This new function updates the minimum width of all of the columns based on 2001-02-13 Christopher James Lahey * e-table-header.c, e-table-header.h (e_table_header_update_horizontal): This new function updates the minimum width of all of the columns based on the data contained in that column. * e-table.c, e-table.h (changed_idle): Added a horizontal_scrolling field. Call e_table_header_update_horizontal if the model changes at all and horizontal_scrolling is set to TRUE. svn path=/trunk/; revision=8214 --- widgets/table/e-table-header.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'widgets/table/e-table-header.c') diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index 6c0d69a82d..58d60480cd 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -789,6 +789,26 @@ eth_calc_widths (ETableHeader *eth) gtk_signal_emit (GTK_OBJECT (eth), eth_signals [DIMENSION_CHANGE]); } +void +e_table_header_update_horizontal (ETableHeader *eth) +{ + int i; + int cols; + + cols = eth->col_count; + + for (i = 0; i < cols; i++) { + int width; + + gtk_signal_emit_by_name (GTK_OBJECT (eth), + "request_width", + i, &width); + eth->columns[i]->min_width = width + 10; + eth->columns[i]->expansion = 1; + } + enqueue(eth, -1, eth->nominal_width); +} + GtkType e_table_header_get_type (void) { @@ -811,4 +831,3 @@ e_table_header_get_type (void) return type; } - -- cgit v1.2.3