aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 */