aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-table-specification.c
diff options
context:
space:
mode:
authorMike Kestner <mkestner@src.gnome.org>2002-11-01 05:30:57 +0800
committerMike Kestner <mkestner@src.gnome.org>2002-11-01 05:30:57 +0800
commit613453b1095e325149b8d37e5731d415e1d5f9bd (patch)
tree1c0d7f9be4d4a87aa67d8e185ae2bb23d02254b7 /widgets/table/e-table-specification.c
parentec242d6c30d7bf056c8f59710b8576c942f93583 (diff)
downloadgsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.gz
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.bz2
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.lz
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.xz
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.tar.zst
gsoc2013-evolution-613453b1095e325149b8d37e5731d415e1d5f9bd.zip
merging the gal-2 branch back to the trunk.
merging the gal-2 branch back to the trunk. svn path=/trunk/; revision=18471
Diffstat (limited to 'widgets/table/e-table-specification.c')
-rw-r--r--widgets/table/e-table-specification.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c
index 7395ce60aa..6d8653b6d6 100644
--- a/widgets/table/e-table-specification.c
+++ b/widgets/table/e-table-specification.c
@@ -1,5 +1,5 @@
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/*
+/*
* e-table-specification.c
* Copyright 2000, 2001, Ximian, Inc.
*
@@ -31,8 +31,8 @@
#include <string.h>
#include <gtk/gtksignal.h>
-#include <gnome-xml/parser.h>
-#include <gnome-xml/xmlmemory.h>
+#include <libxml/parser.h>
+#include <libxml/xmlmemory.h>
#include "gal/util/e-util.h"
#include "gal/util/e-xml-utils.h"
@@ -51,17 +51,17 @@ etsp_destroy (GtkObject *object)
gtk_object_unref (GTK_OBJECT (etsp->columns[i]));
}
g_free (etsp->columns);
+ etsp->columns = NULL;
}
if (etsp->state)
gtk_object_unref (GTK_OBJECT (etsp->state));
+ etsp->state = NULL;
+
g_free (etsp->click_to_add_message);
+ etsp->click_to_add_message = NULL;
g_free (etsp->domain);
-
- etsp->columns = NULL;
- etsp->state = NULL;
- etsp->click_to_add_message = NULL;
etsp->domain = NULL;
GTK_OBJECT_CLASS (etsp_parent_class)->destroy (object);
@@ -251,6 +251,8 @@ e_table_specification_load_from_node (ETableSpecification *specification,
if (!strcmp (children->name, "ETableColumn")) {
ETableColumnSpecification *col_spec = e_table_column_specification_new ();
+ gtk_object_ref (GTK_OBJECT (col_spec));
+ gtk_object_sink (GTK_OBJECT (col_spec));
e_table_column_specification_load_from_node (col_spec, children);
list = g_list_append (list, col_spec);
} else if (specification->state == NULL && !strcmp (children->name, "ETableState")) {
@@ -260,6 +262,11 @@ e_table_specification_load_from_node (ETableSpecification *specification,
}
}
+ if (specification->state == NULL) {
+ /* Make the default state. */
+ specification->state = e_table_state_vanilla (g_list_length (list));
+ }
+
specification->columns = g_new (ETableColumnSpecification *, g_list_length (list) + 1);
for (list2 = list, i = 0; list2; list2 = g_list_next (list2), i++) {
specification->columns[i] = list2->data;
@@ -293,7 +300,7 @@ e_table_specification_save_to_file (ETableSpecification *specification,
xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc));
- ret = e_xml_save_file (filename, doc);
+ ret = xmlSaveFile (filename, doc);
xmlFreeDoc (doc);