aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-sorted-variable.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-12-19 23:58:24 +0800
committerChris Lahey <clahey@src.gnome.org>2000-12-19 23:58:24 +0800
commitdcd4f312232db7d391b1dd969f271f9a65c540c1 (patch)
treef6eb88263ec8fe23ba81e4953a5132dda132ef8b /widgets/table/e-table-sorted-variable.c
parent5d5a132d18b28c7fe3f6464b32c538d8a8955e48 (diff)
downloadgsoc2013-evolution-dcd4f312232db7d391b1dd969f271f9a65c540c1.tar.gz
gsoc2013-evolution-dcd4f312232db7d391b1dd969f271f9a65c540c1.tar.zst
gsoc2013-evolution-dcd4f312232db7d391b1dd969f271f9a65c540c1.zip
Set the minimum width of newly created children.
2000-12-19 Christopher James Lahey <clahey@helixcode.com> * e-table-group-container.c (etgc_add): Set the minimum width of newly created children. (e_table_group_container_construct): Use function e_table_header_get_column_by_col_idx instead of e_table_header_get_column since we're passing in a col_idx. * e-table-header.c, e-table-header.h: New function e_table_header_get_column_by_col_idx which searches for a column in the ETableHeader with a certain model column (col_idx). * e-table-sorted-variable.c (etsv_compare), (etsv_sort), e-table-sorter.c (ets_sort): Use function e_table_header_get_column_by_col_idx instead of e_table_header_get_column since we're passing in a col_idx. svn path=/trunk/; revision=7079
Diffstat (limited to 'widgets/table/e-table-sorted-variable.c')
-rw-r--r--widgets/table/e-table-sorted-variable.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/widgets/table/e-table-sorted-variable.c b/widgets/table/e-table-sorted-variable.c
index 5fd747eaff..216bc8dd4d 100644
--- a/widgets/table/e-table-sorted-variable.c
+++ b/widgets/table/e-table-sorted-variable.c
@@ -133,10 +133,9 @@ etsv_compare(ETableSortedVariable *etsv, int row1, int row2)
for (j = 0; j < sort_count; j++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(etsv->sort_info, j);
ETableCol *col;
- if (column.column > e_table_header_count (etsv->full_header))
+ col = e_table_header_get_column_by_col_idx(etsv->full_header, column.column);
+ if (col == NULL)
col = e_table_header_get_column (etsv->full_header, e_table_header_count (etsv->full_header) - 1);
- else
- col = e_table_header_get_column (etsv->full_header, column.column);
comp_val = (*col->compare)(e_table_model_value_at (etss->source, col->col_idx, row1),
e_table_model_value_at (etss->source, col->col_idx, row2));
ascending = column.ascending;
@@ -640,10 +639,9 @@ etsv_sort(ETableSortedVariable *etsv)
for (j = 0; j < cols; j++) {
ETableSortColumn column = e_table_sort_info_sorting_get_nth(etsv->sort_info, j);
ETableCol *col;
- if (column.column > e_table_header_count (etsv->full_header))
+ col = e_table_header_get_column_by_col_idx(etsv->full_header, column.column);
+ if (col == NULL)
col = e_table_header_get_column (etsv->full_header, e_table_header_count (etsv->full_header) - 1);
- else
- col = e_table_header_get_column (etsv->full_header, column.column);
for (i = 0; i < rows; i++) {
#if 0
if( !(i & 0xff) ) {