]> git.0d.be Git - empathy.git/blobdiff - src/empathy.c
Use a flat namespace for internal includes
[empathy.git] / src / empathy.c
index e2ae2632f6501185bfadb60c45eed019fc260e7b..610150bbd73e507a01411cb83352c38005191afd 100644 (file)
  * Authors: Xavier Claessens <xclaesse@gmail.com>
  */
 
-#include <config.h>
+#include "config.h"
 
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-
-#include <glib.h>
 #include <glib/gstdio.h>
 #include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
 
 #ifdef HAVE_LIBCHAMPLAIN
 #include <clutter-gtk/clutter-gtk.h>
 
 #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-logger/telepathy-logger.h>
-
-#include <libempathy/empathy-client-factory.h>
-#include <libempathy/empathy-connection-aggregator.h>
-#include <libempathy/empathy-presence-manager.h>
-#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-chatroom-manager.h>
-#include <libempathy/empathy-account-settings.h>
-#include <libempathy/empathy-connection-managers.h>
-#include <libempathy/empathy-request-util.h>
-#include <libempathy/empathy-ft-factory.h>
-#include <libempathy/empathy-gsettings.h>
-#include <libempathy/empathy-tp-chat.h>
-
-#include <libempathy-gtk/empathy-ui-utils.h>
-#include <libempathy-gtk/empathy-location-manager.h>
-#include <libempathy-gtk/empathy-notify-manager.h>
+#include "empathy-client-factory.h"
+#include "empathy-connection-aggregator.h"
+#include "empathy-presence-manager.h"
+#include "empathy-utils.h"
+#include "empathy-chatroom-manager.h"
+#include "empathy-request-util.h"
+#include "empathy-ft-factory.h"
+#include "empathy-gsettings.h"
+
+#include "empathy-ui-utils.h"
+#include "empathy-location-manager.h"
 
 #include "empathy-roster-window.h"
 #include "empathy-accounts-common.h"
 #include "empathy-ft-manager.h"
 #include "empathy-notifications-approver.h"
 
-#include "extensions/extensions.h"
-
 #define DEBUG_FLAG EMPATHY_DEBUG_OTHER
-#include <libempathy/empathy-debug.h>
+#include "empathy-debug.h"
 
 #define EMPATHY_DBUS_NAME "org.gnome.Empathy"
 
@@ -709,7 +687,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 +700,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 +743,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 */