]> git.0d.be Git - empathy.git/blobdiff - src/empathy.c
include telepathy-glib.h
[empathy.git] / src / empathy.c
index e2ae2632f6501185bfadb60c45eed019fc260e7b..fcfa0bc65e8a9e2d389e2dbc5eaf6716fd0bcb68 100644 (file)
 
 #include <libnotify/notify.h>
 
-#include <telepathy-glib/account-manager.h>
-#include <telepathy-glib/dbus.h>
-#include <telepathy-glib/debug-sender.h>
-#include <telepathy-glib/util.h>
-#include <telepathy-glib/connection-manager.h>
-#include <telepathy-glib/interfaces.h>
+#include <telepathy-glib/telepathy-glib.h>
 
 #include <telepathy-logger/telepathy-logger.h>
 
@@ -709,7 +704,7 @@ account_manager_chatroom_ready_cb (GObject *source_object,
       return;
     }
 
-  accounts = tp_account_manager_get_valid_accounts (account_manager);
+  accounts = tp_account_manager_dup_valid_accounts (account_manager);
 
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
@@ -722,7 +717,7 @@ account_manager_chatroom_ready_cb (GObject *source_object,
       tp_g_signal_connect_object (account, "notify::connection",
         G_CALLBACK (account_connection_changed_cb), chatroom_manager, 0);
     }
-  g_list_free (accounts);
+  g_list_free_full (accounts, g_object_unref);
 }
 
 static void
@@ -765,6 +760,8 @@ empathy_app_constructed (GObject *object)
   tp_proxy_prepare_async (self->account_manager, NULL,
       account_manager_ready_cb, self);
 
+  tp_account_manager_enable_restart (self->account_manager);
+
   migrate_config_to_xdg_dir ();
 
   /* Logging */