aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-04-20 10:00:23 +0800
committerChris Lahey <clahey@src.gnome.org>2001-04-20 10:00:23 +0800
commit270a8bdda829d69f1d2849f387391dddba7851fa (patch)
tree50da232c6d47f74a566a2a22f265d73e598f96d6 /widgets/table/e-table-header.c
parent995e7b0612b6779818053d142b6cbfd6f1ff1b39 (diff)
downloadgsoc2013-evolution-270a8bdda829d69f1d2849f387391dddba7851fa.tar
gsoc2013-evolution-270a8bdda829d69f1d2849f387391dddba7851fa.tar.gz
gsoc2013-evolution-270a8bdda829d69f1d2849f387391dddba7851fa.tar.bz2
gsoc2013-evolution-270a8bdda829d69f1d2849f387391dddba7851fa.tar.lz
gsoc2013-evolution-270a8bdda829d69f1d2849f387391dddba7851fa.tar.xz
gsoc2013-evolution-270a8bdda829d69f1d2849f387391dddba7851fa.tar.zst
gsoc2013-evolution-270a8bdda829d69f1d2849f387391dddba7851fa.zip
Submit a signal even if there are no extras.
2001-04-19 Christopher James Lahey <clahey@ximian.com> * 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
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",