aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-01-26 12:34:29 +0800
committerChris Toshok <toshok@src.gnome.org>2003-01-26 12:34:29 +0800
commitd890e1c9c9b2302e9c367dab27bb64c553208983 (patch)
treef64124dc94fb5aeaa44c0fab67275608463fedc2 /e-util
parent8127537c39e76fa7f0a1d7c0c55a89d7551b0b82 (diff)
downloadgsoc2013-evolution-d890e1c9c9b2302e9c367dab27bb64c553208983.tar.gz
gsoc2013-evolution-d890e1c9c9b2302e9c367dab27bb64c553208983.tar.zst
gsoc2013-evolution-d890e1c9c9b2302e9c367dab27bb64c553208983.zip
g_file_exists -> g_file_test. (e_pilot_map_write): don't use doc->root.
2003-01-25 Chris Toshok <toshok@ximian.com> * e-pilot-map.c (e_pilot_map_read): g_file_exists -> g_file_test. (e_pilot_map_write): don't use doc->root. svn path=/trunk/; revision=19631
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-pilot-map.c12
2 files changed, 10 insertions, 7 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 8aa4d7740e..f0eaf86194 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,5 +1,10 @@
2003-01-25 Chris Toshok <toshok@ximian.com>
+ * e-pilot-map.c (e_pilot_map_read): g_file_exists -> g_file_test.
+ (e_pilot_map_write): don't use doc->root.
+
+2003-01-25 Chris Toshok <toshok@ximian.com>
+
* e-pilot-settings.[ch]: GObjectify this.
2003-01-24 Hans Petter Jansson <hpj@ximian.com>
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c
index a113427da3..e155657732 100644
--- a/e-util/e-pilot-map.c
+++ b/e-util/e-pilot-map.c
@@ -25,9 +25,7 @@
#include <string.h> /* memset(), strcmp() */
#include <stdlib.h>
#include <glib.h>
-#include <gnome-xml/parser.h>
-#include <libgnome/gnome-defs.h>
-#include <libgnome/gnome-util.h>
+#include <libxml/parser.h>
typedef struct
{
@@ -365,7 +363,7 @@ e_pilot_map_read (const char *filename, EPilotMap **map)
new_map->pid_map = g_hash_table_new (g_int_hash, g_int_equal);
new_map->uid_map = g_hash_table_new (g_str_hash, g_str_equal);
- if (g_file_exists (filename)) {
+ if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
if (xmlSAXUserParseFile (&handler, new_map, filename) < 0) {
g_free (new_map);
return -1;
@@ -394,12 +392,12 @@ e_pilot_map_write (const char *filename, EPilotMap *map)
g_warning ("Pilot map file could not be created\n");
return -1;
}
- doc->root = xmlNewDocNode(doc, NULL, "PilotMap", NULL);
+ xmlDocSetRootElement (doc, xmlNewDocNode(doc, NULL, "PilotMap", NULL));
map->since = time (NULL);
- map_set_node_timet (doc->root, "timestamp", map->since);
+ map_set_node_timet (xmlDocGetRootElement (doc), "timestamp", map->since);
wd.touched_only = map->write_touched_only;
- wd.root = doc->root;
+ wd.root = xmlDocGetRootElement(doc);
g_hash_table_foreach (map->uid_map, map_write_foreach, &wd);
/* Write the file */