aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-table-state.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-state.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-state.c')
-rw-r--r--e-util/e-table-state.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/e-util/e-table-state.c b/e-util/e-table-state.c
index 77903c7ac8..8dbe488f58 100644
--- a/e-util/e-table-state.c
+++ b/e-util/e-table-state.c
@@ -173,18 +173,22 @@ ETableState *
e_table_state_vanilla (ETableSpecification *specification)
{
ETableState *state;
+ GPtrArray *columns;
GString *str;
- gint ii;
+ guint ii;
g_return_val_if_fail (E_IS_TABLE_SPECIFICATION (specification), NULL);
- g_return_val_if_fail (specification->columns != NULL, NULL);
+
+ columns = e_table_specification_ref_columns (specification);
str = g_string_new ("<ETableState>\n");
- for (ii = 0; specification->columns[ii] != NULL; ii++)
+ for (ii = 0; ii < columns->len; ii++)
g_string_append_printf (str, " <column source=\"%d\"/>\n", ii);
g_string_append (str, " <grouping></grouping>\n");
g_string_append (str, "</ETableState>\n");
+ g_ptr_array_unref (columns);
+
state = e_table_state_new (specification);
e_table_state_load_from_string (state, str->str);