From 270a8bdda829d69f1d2849f387391dddba7851fa Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 20 Apr 2001 02:00:23 +0000 Subject: Submit a signal even if there are no extras. 2001-04-19 Christopher James Lahey * e-table-header.c (eth_calc_widths): Submit a signal even if there are no extras. * e-table-item.c (eti_request_column_width): Don't compute widths if our cells aren't realized yet. * e-tree.c: Call e_table_header_update_horizontal whenever our data changes. svn path=/trunk/; revision=9465 --- widgets/table/e-table-header.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (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 4e45cd2833..56c7bed164 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -777,14 +777,14 @@ eth_calc_widths (ETableHeader *eth) } if (eth->sort_info) extra -= e_table_sort_info_grouping_get_count(eth->sort_info) * GROUP_INDENT; - if (expansion == 0 || extra <= 0) - return; - for (i = 0; i < last_resizable; i++) { - next_position += extra * (eth->columns[i]->resizable ? eth->columns[i]->expansion : 0)/expansion; - eth->columns[i]->width += next_position - last_position; - last_position = next_position; + if (expansion != 0 && extra > 0) { + for (i = 0; i < last_resizable; i++) { + next_position += extra * (eth->columns[i]->resizable ? eth->columns[i]->expansion : 0)/expansion; + eth->columns[i]->width += next_position - last_position; + last_position = next_position; + } + eth->columns[i]->width += extra - last_position; } - eth->columns[i]->width += extra - last_position; eth_update_offsets (eth); gtk_signal_emit (GTK_OBJECT (eth), eth_signals [DIMENSION_CHANGE]); @@ -799,7 +799,7 @@ e_table_header_update_horizontal (ETableHeader *eth) cols = eth->col_count; for (i = 0; i < cols; i++) { - int width; + int width = 0; gtk_signal_emit_by_name (GTK_OBJECT (eth), "request_width", -- cgit v1.2.3