]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-contact-groups.c
Be more compatible with Facebook emoticon codes
[empathy.git] / libempathy / empathy-contact-groups.c
index 7244c16228492e267ae02844cfa94ff68dc3e6e2..7818eb5573212c0fd7d704d71435504ab924fd30 100644 (file)
  */
 
 #include "config.h"
+#include "empathy-contact-groups.h"
 
-#include <string.h>
-#include <sys/types.h>
 #include <sys/stat.h>
-
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-
-#include <libxml/parser.h>
-#include <libxml/tree.h>
+#include <tp-account-widgets/tpaw-utils.h>
 
 #include "empathy-utils.h"
-#include "empathy-contact-groups.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
 #include "empathy-debug.h"
 
 #define CONTACT_GROUPS_XML_FILENAME "contact-groups.xml"
-#define CONTACT_GROUPS_DTD_FILENAME "empathy-contact-groups.dtd"
+#define CONTACT_GROUPS_DTD_RESOURCENAME "/org/gnome/Empathy/empathy-contact-groups.dtd"
 
 typedef struct {
        gchar    *name;
@@ -99,7 +92,7 @@ contact_groups_file_parse (const gchar *filename)
                return;
        }
 
-       if (!empathy_xml_validate (doc, CONTACT_GROUPS_DTD_FILENAME)) {
+       if (!tpaw_xml_validate_from_resource (doc, CONTACT_GROUPS_DTD_RESOURCENAME)) {
                g_warning ("Failed to validate file:'%s'", filename);
                xmlFreeDoc (doc);
                xmlFreeParserCtxt (ctxt);
@@ -221,7 +214,6 @@ contact_groups_file_save (void)
        xmlSaveFormatFileEnc (file, doc, "utf-8", 1);
        xmlFreeDoc (doc);
 
-       xmlCleanupParser ();
        xmlMemoryDump ();
 
        g_free (file);