diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-05-05 08:10:32 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-05-05 08:10:32 +0800 |
commit | ccd8e1fedde7a29acb5e10ade7e69b9197e65dbe (patch) | |
tree | 5c5d9b1d535b32aca4eb6926df4e968c2b4bd2ab /widgets/table/e-table-sort-info.c | |
parent | ad3ee0de0244facb7bd2eed03805b68d01022601 (diff) | |
download | gsoc2013-evolution-ccd8e1fedde7a29acb5e10ade7e69b9197e65dbe.tar.gz gsoc2013-evolution-ccd8e1fedde7a29acb5e10ade7e69b9197e65dbe.tar.zst gsoc2013-evolution-ccd8e1fedde7a29acb5e10ade7e69b9197e65dbe.zip |
Add an e_table_group_add_all function and implement it in the different
2000-05-04 Christopher James Lahey <clahey@helixcode.com>
* 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
Diffstat (limited to 'widgets/table/e-table-sort-info.c')
-rw-r--r-- | widgets/table/e-table-sort-info.c | 24 |
1 files changed, 18 insertions, 6 deletions
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); |