From 613453b1095e325149b8d37e5731d415e1d5f9bd Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Thu, 31 Oct 2002 21:30:57 +0000 Subject: merging the gal-2 branch back to the trunk. merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471 --- widgets/table/e-table-state.c | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'widgets/table/e-table-state.c') diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index c9117add68..64b911f38f 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -1,5 +1,5 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* +/* * e-table-state.c * Copyright 2000, 2001, Ximian, Inc. * @@ -21,7 +21,6 @@ * 02111-1307, USA. */ - #ifdef HAVE_CONFIG_H #include #endif @@ -31,8 +30,8 @@ #include #include -#include -#include +#include +#include #include "gal/util/e-util.h" #include "gal/util/e-xml-utils.h" #include "e-table-state.h" @@ -95,6 +94,26 @@ e_table_state_new (void) return (ETableState *) etst; } +ETableState * +e_table_state_vanilla (int col_count) +{ + GString *str; + int i; + ETableState *res; + + str = g_string_new ("\n"); + for (i = 0; i < col_count; i++) + g_string_append_printf (str, " \n", i); + g_string_append (str, " \n"); + g_string_append (str, "\n"); + + res = e_table_state_new (); + e_table_state_load_from_string (res, str->str); + + g_string_free (str, TRUE); + return res; +} + gboolean e_table_state_load_from_file (ETableState *state, const char *filename) @@ -191,7 +210,7 @@ e_table_state_save_to_file (ETableState *state, xmlDocSetRootElement (doc, e_table_state_save_to_node (state, NULL)); - e_xml_save_file (filename, doc); + xmlSaveFile (filename, doc); xmlFreeDoc (doc); } -- cgit v1.2.3