aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-header.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2002-03-16 04:36:07 +0800
committerChris Lahey <clahey@src.gnome.org>2002-03-16 04:36:07 +0800
commita17d29d26cad4dec987f3db39da19e36a545bb01 (patch)
tree9a5af41dee6bf73960523731b5dfedb1cbb5b9d8 /widgets/table/e-table-header.c
parentcbbaa07125fafaa8c0546d5ba087c25eb39480c7 (diff)
downloadgsoc2013-evolution-a17d29d26cad4dec987f3db39da19e36a545bb01.tar
gsoc2013-evolution-a17d29d26cad4dec987f3db39da19e36a545bb01.tar.gz
gsoc2013-evolution-a17d29d26cad4dec987f3db39da19e36a545bb01.tar.bz2
gsoc2013-evolution-a17d29d26cad4dec987f3db39da19e36a545bb01.tar.lz
gsoc2013-evolution-a17d29d26cad4dec987f3db39da19e36a545bb01.tar.xz
gsoc2013-evolution-a17d29d26cad4dec987f3db39da19e36a545bb01.tar.zst
gsoc2013-evolution-a17d29d26cad4dec987f3db39da19e36a545bb01.zip
New function that returns the total minimum width of all the columns.
2002-03-15 Christopher James Lahey <clahey@ximian.com> * e-table-header.c, e-table-header.h (e_table_header_min_width): New function that returns the total minimum width of all the columns. * e-table.c, e-table.h (set_header_width): Call e_table_header_min_width here instead of total_width. (et_size_request): Override the size_request method instead of doing set_usize. svn path=/trunk/; revision=16175
Diffstat (limited to 'widgets/table/e-table-header.c')
-rw-r--r--widgets/table/e-table-header.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c
index d983ab36e7..e5eda9fd42 100644
--- a/widgets/table/e-table-header.c
+++ b/widgets/table/e-table-header.c
@@ -570,6 +570,27 @@ e_table_header_total_width (ETableHeader *eth)
}
/**
+ * e_table_header_min_width:
+ * @eth: The ETableHeader to query
+ *
+ * Returns: the minimum number of pixels required by the @eth object.
+ **/
+int
+e_table_header_min_width (ETableHeader *eth)
+{
+ int total, i;
+
+ g_return_val_if_fail (eth != NULL, 0);
+ g_return_val_if_fail (E_IS_TABLE_HEADER (eth), 0);
+
+ total = 0;
+ for (i = 0; i < eth->col_count; i++)
+ total += eth->columns [i]->min_width;
+
+ return total;
+}
+
+/**
* e_table_header_move:
* @eth: The ETableHeader to operate on.
* @source_index: the source column to move.