]> git.0d.be Git - empathy.git/blobdiff - libempathy-gtk/empathy-account-chooser.c
Merge branch 'gnome-3-8'
[empathy.git] / libempathy-gtk / empathy-account-chooser.c
index 87fdbbfe8f5ab53e25000a7b4e7af7706823ecda..e6f4367c9eda828ccc8a37eecfd1fb50de3ef6ae 100644 (file)
  */
 
 #include "config.h"
-
-#include <string.h>
+#include "empathy-account-chooser.h"
 
 #include <glib/gi18n-lib.h>
-#include <gtk/gtk.h>
-
-#include <telepathy-glib/account-manager.h>
-#include <telepathy-glib/util.h>
-
-#include <libempathy/empathy-utils.h>
 
 #include "empathy-ui-utils.h"
-#include "empathy-account-chooser.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 /**
  * SECTION:empathy-account-chooser
@@ -90,6 +82,10 @@ filter_result_callback_data_new (EmpathyAccountChooser *self,
 {
   FilterResultCallbackData *data;
 
+  g_return_val_if_fail (self != NULL, NULL);
+  g_return_val_if_fail (account != NULL, NULL);
+  g_return_val_if_fail (iter != NULL, NULL);
+
   data = g_slice_new0 (FilterResultCallbackData);
   data->self = g_object_ref (self);
   data->account = g_object_ref (account);
@@ -137,7 +133,7 @@ static void account_chooser_account_removed_cb (TpAccountManager *manager,
     TpAccount *account,
     EmpathyAccountChooser *self);
 static void account_chooser_account_remove_foreach (TpAccount *account,
-    EmpathyAccountChooser*self);
+    EmpathyAccountChooser *self);
 static void account_chooser_update_iter (EmpathyAccountChooser *self,
     GtkTreeIter *iter);
 static void account_chooser_status_changed_cb (TpAccount *account,
@@ -276,7 +272,7 @@ account_manager_prepared_cb (GObject *source_object,
       return;
     }
 
-  accounts = tp_account_manager_get_valid_accounts (manager);
+  accounts = tp_account_manager_dup_valid_accounts (manager);
 
   for (l = accounts; l != NULL; l = l->next)
     {
@@ -297,7 +293,7 @@ account_manager_prepared_cb (GObject *source_object,
           self, 0);
     }
 
-  g_list_free (accounts);
+  g_list_free_full (accounts, g_object_unref);
 
   if (self->priv->select_when_ready != NULL)
     {
@@ -791,7 +787,7 @@ account_chooser_find_account_foreach (GtkTreeModel *model,
 static gboolean
 account_chooser_find_account (EmpathyAccountChooser *self,
     TpAccount *account,
-    GtkTreeIter*iter)
+    GtkTreeIter *iter)
 {
   GtkListStore *store;
   GtkComboBox *combobox;