aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-tree-table-adapter.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-07 11:37:40 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-07 11:37:40 +0800
commit7cc54f371cf51ca0879126becd4c138eb1f90ad2 (patch)
tree05fd1d27495e27f363789bd3b4dae30e857d803b /widgets/table/e-tree-table-adapter.c
parentb446318dfa53347210444123d20433cc7829105a (diff)
downloadgsoc2013-evolution-7cc54f371cf51ca0879126becd4c138eb1f90ad2.tar.gz
gsoc2013-evolution-7cc54f371cf51ca0879126becd4c138eb1f90ad2.tar.zst
gsoc2013-evolution-7cc54f371cf51ca0879126becd4c138eb1f90ad2.zip
And finally here.
2002-08-06 Jeffrey Stedfast <fejj@ximian.com> * e-tree-table-adapter.c (e_tree_table_adapter_save_expanded_state): And finally here. * e-table-state.c (e_table_state_save_to_file): Same here. * e-table-specification.c (e_table_specification_save_to_file): No need to save to a temp file first here either since e_xml_save_file now does that for us. * e-table.c (e_table_save_specification): No need to handle writing to a temp file first anymore, since I've updated e_xml_save_file() to handle that for us. svn path=/trunk/; revision=17724
Diffstat (limited to 'widgets/table/e-tree-table-adapter.c')
-rw-r--r--widgets/table/e-tree-table-adapter.c21
1 files changed, 2 insertions, 19 deletions
diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c
index 552b15ddf6..92c33668de 100644
--- a/widgets/table/e-tree-table-adapter.c
+++ b/widgets/table/e-tree-table-adapter.c
@@ -27,11 +27,8 @@
#include <config.h>
#endif
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <unistd.h>
-#include <errno.h>
#include <gtk/gtksignal.h>
#include <gnome-xml/tree.h>
@@ -940,17 +937,15 @@ void
e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *filename)
{
ETreeTableAdapterPriv *priv;
- char *tmp, *slash;
TreeAndRoot tar;
xmlDocPtr doc;
xmlNode *root;
- int ret;
g_return_if_fail(etta != NULL);
priv = etta->priv;
- doc = xmlNewDoc ((xmlChar*) "1.0");
+ doc = xmlNewDoc ("1.0");
root = xmlNewDocNode (doc, NULL,
(xmlChar *) "expanded_state",
NULL);
@@ -966,19 +961,7 @@ e_tree_table_adapter_save_expanded_state (ETreeTableAdapter *etta, const char *f
save_expanded_state_func,
&tar);
- tmp = alloca (strlen (filename) + 5);
- slash = strrchr (filename, '/');
- if (slash)
- sprintf (tmp, "%.*s.#%s", slash - filename + 1, filename, slash + 1);
- else
- sprintf (tmp, ".#%s", filename);
-
- ret = e_xml_save_file (tmp, doc);
- if (ret != -1)
- ret = rename (tmp, filename);
-
- if (ret == -1)
- unlink (tmp);
+ e_xml_save_file (filename, doc);
xmlFreeDoc (doc);
}