aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-table-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-27 01:05:02 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:08 +0800
commit37aae129f397e5973910ff227a0f18efb1b5d2fe (patch)
tree94d9a557c3ea44dc1892df1f3931e6f7ca7c60cc /e-util/e-table-utils.c
parente663dec920f8359f07c6047f2ef3eb10f052f1e8 (diff)
downloadgsoc2013-evolution-37aae129f397e5973910ff227a0f18efb1b5d2fe.tar
gsoc2013-evolution-37aae129f397e5973910ff227a0f18efb1b5d2fe.tar.gz
gsoc2013-evolution-37aae129f397e5973910ff227a0f18efb1b5d2fe.tar.bz2
gsoc2013-evolution-37aae129f397e5973910ff227a0f18efb1b5d2fe.tar.lz
gsoc2013-evolution-37aae129f397e5973910ff227a0f18efb1b5d2fe.tar.xz
gsoc2013-evolution-37aae129f397e5973910ff227a0f18efb1b5d2fe.tar.zst
gsoc2013-evolution-37aae129f397e5973910ff227a0f18efb1b5d2fe.zip
ETableSpecification: Make the columns array private.
Use e_table_specification_ref_columns() to access column specs.
Diffstat (limited to 'e-util/e-table-utils.c')
-rw-r--r--e-util/e-table-utils.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/e-util/e-table-utils.c b/e-util/e-table-utils.c
index b914e595b4..1bd16a928e 100644
--- a/e-util/e-table-utils.c
+++ b/e-util/e-table-utils.c
@@ -148,23 +148,31 @@ e_table_spec_to_full_header (ETableSpecification *spec,
ETableExtras *ete)
{
ETableHeader *nh;
- gint column;
+ GPtrArray *columns;
+ guint ii;
g_return_val_if_fail (spec, NULL);
g_return_val_if_fail (ete, NULL);
nh = e_table_header_new ();
- for (column = 0; spec->columns[column]; column++) {
- ETableCol *col = et_col_spec_to_col (
- spec->columns[column], ete, spec->domain);
+ columns = e_table_specification_ref_columns (spec);
- if (col) {
+ for (ii = 0; ii < columns->len; ii++) {
+ ETableColumnSpecification *col_spec;
+ ETableCol *col;
+
+ col_spec = g_ptr_array_index (columns, ii);
+ col = et_col_spec_to_col (col_spec, ete, spec->domain);
+
+ if (col != NULL) {
e_table_header_add_column (nh, col, -1);
g_object_unref (col);
}
}
+ g_ptr_array_unref (columns);
+
return nh;
}