From ccd8e1fedde7a29acb5e10ade7e69b9197e65dbe Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Fri, 5 May 2000 00:10:32 +0000 Subject: Add an e_table_group_add_all function and implement it in the different 2000-05-04 Christopher James Lahey * e-table-group-container.c, e-table-group-leaf.c, e-table-group.c, e-table-group.h: Add an e_table_group_add_all function and implement it in the different ETableGroup classes. * e-table-sort-info.c: Make set_nth not call changed twice if it needs to allocate more space. * e-table-sorted-variable.c, e-table-subset-variable.c, e-table-subset-variable.h: Add and implement an e_table_subset_variable_add_all command. * e-table.c: Use e_table_group_add_all as appropriate. Fix ETable grouping xml to work if there is a text element at the bottom of the grouping tree. svn path=/trunk/; revision=2806 --- widgets/table/e-table-sort-info.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'widgets/table/e-table-sort-info.c') diff --git a/widgets/table/e-table-sort-info.c b/widgets/table/e-table-sort-info.c index b33784c140..32ba3d9e65 100644 --- a/widgets/table/e-table-sort-info.c +++ b/widgets/table/e-table-sort-info.c @@ -143,8 +143,8 @@ e_table_sort_info_grouping_get_count (ETableSortInfo *info) return info->group_count; } -void -e_table_sort_info_grouping_truncate (ETableSortInfo *info, int length) +static void +e_table_sort_info_grouping_real_truncate (ETableSortInfo *info, int length) { if (length < info->group_count) { info->group_count = length; @@ -153,6 +153,12 @@ e_table_sort_info_grouping_truncate (ETableSortInfo *info, int length) info->groupings = g_realloc(info->groupings, length * sizeof(ETableSortColumn)); info->group_count = length; } +} + +void +e_table_sort_info_grouping_truncate (ETableSortInfo *info, int length) +{ + e_table_sort_info_grouping_real_truncate(info, length); e_table_sort_info_group_info_changed(info); } @@ -171,7 +177,7 @@ void e_table_sort_info_grouping_set_nth (ETableSortInfo *info, int n, ETableSortColumn column) { if (n >= info->group_count) { - e_table_sort_info_grouping_truncate(info, n + 1); + e_table_sort_info_grouping_real_truncate(info, n + 1); } info->groupings[n] = column; e_table_sort_info_group_info_changed(info); @@ -184,8 +190,8 @@ e_table_sort_info_sorting_get_count (ETableSortInfo *info) return info->sort_count; } -void -e_table_sort_info_sorting_truncate (ETableSortInfo *info, int length) +static void +e_table_sort_info_sorting_real_truncate (ETableSortInfo *info, int length) { if (length < info->sort_count) { info->sort_count = length; @@ -194,6 +200,12 @@ e_table_sort_info_sorting_truncate (ETableSortInfo *info, int length) info->sortings = g_realloc(info->sortings, length * sizeof(ETableSortColumn)); info->sort_count = length; } +} + +void +e_table_sort_info_sorting_truncate (ETableSortInfo *info, int length) +{ + e_table_sort_info_sorting_real_truncate (info, length); e_table_sort_info_sort_info_changed(info); } @@ -212,7 +224,7 @@ void e_table_sort_info_sorting_set_nth (ETableSortInfo *info, int n, ETableSortColumn column) { if (n >= info->sort_count) { - e_table_sort_info_sorting_truncate(info, n + 1); + e_table_sort_info_sorting_real_truncate(info, n + 1); } info->sortings[n] = column; e_table_sort_info_sort_info_changed(info); -- cgit v1.2.3