diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-02-14 07:15:13 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-02-14 07:15:13 +0800 |
commit | d4be90f9b25a398cafa91adec4098847ee4198cf (patch) | |
tree | dfbf85264f01cec237ab2785166f9446be124680 /widgets/table/e-table-header.c | |
parent | 6e67c20da8be56717c25807b65af8c8723e7e78c (diff) | |
download | gsoc2013-evolution-d4be90f9b25a398cafa91adec4098847ee4198cf.tar.gz gsoc2013-evolution-d4be90f9b25a398cafa91adec4098847ee4198cf.tar.zst gsoc2013-evolution-d4be90f9b25a398cafa91adec4098847ee4198cf.zip |
This new function updates the minimum width of all of the columns based on
2001-02-13 Christopher James Lahey <clahey@ximian.com>
* 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
Diffstat (limited to 'widgets/table/e-table-header.c')
-rw-r--r-- | widgets/table/e-table-header.c | 21 |
1 files changed, 20 insertions, 1 deletions
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; } - |