]> git.0d.be Git - empathy.git/blobdiff - libempathy/empathy-status-presets.c
Updated Czech translation
[empathy.git] / libempathy / empathy-status-presets.c
index 255f7ab211e9bb71ec23ab1b424a7d275b625358..aacee83d82fa112e0af8daa05bcd2dc86fd76062 100644 (file)
  */
 
 #include "config.h"
+#include "empathy-status-presets.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
-#include <string.h>
-
-#include <glib.h>
-#include <glib/gi18n-lib.h>
-
-#include <libxml/parser.h>
-#include <libxml/tree.h>
-
-#include <telepathy-glib/util.h>
+#include <tp-account-widgets/tpaw-utils.h>
 
 #include "empathy-utils.h"
-#include "empathy-status-presets.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
 #include "empathy-debug.h"
 
 #define STATUS_PRESETS_XML_FILENAME "status-presets.xml"
-#define STATUS_PRESETS_DTD_FILENAME "empathy-status-presets.dtd"
+#define STATUS_PRESETS_DTD_RESOURCENAME "/org/gnome/Empathy/empathy-status-presets.dtd"
 #define STATUS_PRESETS_MAX_EACH     15
 
 typedef struct {
@@ -102,7 +93,7 @@ status_presets_file_parse (const gchar *filename)
                return;
        }
 
-       if (!empathy_xml_validate (doc, STATUS_PRESETS_DTD_FILENAME)) {
+       if (!tpaw_xml_validate_from_resource (doc, STATUS_PRESETS_DTD_RESOURCENAME)) {
                g_warning ("Failed to validate file:'%s'", filename);
                xmlFreeDoc (doc);
                xmlFreeParserCtxt (ctxt);
@@ -196,10 +187,10 @@ status_presets_file_save (void)
        GList      *l;
        gchar      *dir;
        gchar      *file;
-       gint        count[NUM_TP_CONNECTION_PRESENCE_TYPES];
+       gint        count[TP_NUM_CONNECTION_PRESENCE_TYPES];
        gint        i;
 
-       for (i = 0; i < NUM_TP_CONNECTION_PRESENCE_TYPES; i++) {
+       for (i = 0; i < TP_NUM_CONNECTION_PRESENCE_TYPES; i++) {
                count[i] = 0;
        }
 
@@ -431,6 +422,8 @@ empathy_status_presets_is_valid (TpConnectionPresenceType state)
                case TP_CONNECTION_PRESENCE_TYPE_HIDDEN:
                case TP_CONNECTION_PRESENCE_TYPE_BUSY:
                        return TRUE;
+
+               default:
+                       return FALSE;
        }
-       return FALSE;
 }