aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-table-header.c')
-rw-r--r--widgets/table/e-table-header.c16
1 files changed, 8 insertions, 8 deletions
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",