]> git.0d.be Git - empathy.git/blobdiff - src/empathy-import-widget.c
Use a flat namespace for internal includes
[empathy.git] / src / empathy-import-widget.c
index 6a2d24a81f056df5d3203e019a1900fc98ca063e..68a71d5ffb1e1011fe91859a93e8b6e766d64f45 100644 (file)
 
 /* empathy-import-widget.c */
 
-#include <config.h>
+#include "config.h"
 
 #include "empathy-import-dialog.h"
 #include "empathy-import-widget.h"
-#include "empathy-import-pidgin.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
-#include <libempathy/empathy-debug.h>
-#include <libempathy/empathy-connection-managers.h>
-#include <libempathy/empathy-utils.h>
+#include "empathy-debug.h"
+#include "empathy-utils.h"
 
-#include <libempathy-gtk/empathy-ui-utils.h>
-
-#include <telepathy-glib/account-manager.h>
-#include <telepathy-glib/util.h>
+#include "empathy-ui-utils.h"
 
 #include <glib/gi18n-lib.h>
 
@@ -99,7 +94,6 @@ import_widget_add_accounts_to_model (EmpathyImportWidget *self)
 {
   TpAccountManager *manager;
   GtkTreeModel *model;
-  GtkTreeIter iter;
   GList *l;
   EmpathyImportWidgetPriv *priv = GET_PRIV (self);
   gint min, natural;
@@ -124,18 +118,16 @@ import_widget_add_accounts_to_model (EmpathyImportWidget *self)
 
       value = g_hash_table_lookup (data->settings, "account");
 
-      accounts = tp_account_manager_get_valid_accounts (manager);
+      accounts = tp_account_manager_dup_valid_accounts (manager);
 
       /* Only set the "Import" cell to be active if there isn't already an
        * account set up with the same account id. */
       import = !import_widget_account_id_in_list (accounts,
           g_value_get_string (value));
 
-      g_list_free (accounts);
-
-      gtk_list_store_append (GTK_LIST_STORE (model), &iter);
+      g_list_free_full (accounts, g_object_unref);
 
-      gtk_list_store_set (GTK_LIST_STORE (model), &iter,
+      gtk_list_store_insert_with_values (GTK_LIST_STORE (model), NULL, -1,
           COL_IMPORT, import,
           COL_PROTOCOL, data->protocol,
           COL_NAME, g_value_get_string (value),