]> git.0d.be Git - empathy.git/blobdiff - src/empathy-import-utils.c
Merge remote-tracking branch 'origin/gnome-3-8'
[empathy.git] / src / empathy-import-utils.c
index 520f056f48f917a601b86d67a57036eeb9db7a5f..c382336474e5f9eddf418112135f8d8ca50a7c4f 100644 (file)
  *          Cosimo Cecchi <cosimo.cecchi@collabora.co.uk>
  */
 
-#include <telepathy-glib/util.h>
-
-#include <libempathy/empathy-connection-managers.h>
-#include <libempathy/empathy-utils.h>
-
+#include "config.h"
 #include "empathy-import-utils.h"
+
+#include "empathy-connection-managers.h"
 #include "empathy-import-pidgin.h"
+#include "empathy-utils.h"
 
 EmpathyImportAccountData *
 empathy_import_account_data_new (const gchar *source)
@@ -40,6 +39,7 @@ empathy_import_account_data_new (const gchar *source)
   data->source = g_strdup (source);
   data->protocol = NULL;
   data->connection_manager = NULL;
+  data->enabled = FALSE;
 
   return data;
 }
@@ -54,7 +54,7 @@ empathy_import_account_data_free (EmpathyImportAccountData *data)
   if (data->connection_manager != NULL)
     g_free (data->connection_manager);
   if (data->settings != NULL)
-    g_hash_table_destroy (data->settings);
+    g_hash_table_unref (data->settings);
   if (data->source != NULL)
     g_free (data->source);
 
@@ -95,6 +95,10 @@ empathy_import_protocol_is_supported (const gchar *protocol,
       if (tp_connection_manager_has_protocol (tp_cm,
           (const gchar*) protocol))
         {
+          if (!tp_strdiff (protocol, "irc")
+              && !tp_strdiff (tp_connection_manager_get_name (tp_cm), "haze"))
+              continue;
+
           if (!proto_is_supported)
             {
               *cm = tp_cm;
@@ -106,7 +110,7 @@ empathy_import_protocol_is_supported (const gchar *protocol,
           /* we have more than one CM for this protocol,
            * select the one which is not haze.
            */
-          if (!tp_strdiff ((*cm)->name, "haze"))
+          if (!tp_strdiff (tp_connection_manager_get_name ((*cm)), "haze"))
             {
               *cm = tp_cm;
               break;