]> git.0d.be Git - empathy.git/blobdiff - src/empathy-accounts.c
Use double quotes for all internal headers
[empathy.git] / src / empathy-accounts.c
index 6b51820f7e3d53f88b63179319ca8790a16a0ebc..57f6968c83f93998b7647c96e6bae7f35ed05505 100644 (file)
  *          Travis Reitter <travis.reitter@collabora.co.uk>
  */
 
-#include <config.h>
+#include "config.h"
 
-#include <string.h>
-#include <stdlib.h>
-
-#include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
-#include <telepathy-glib/account-manager.h>
-#include <telepathy-glib/defs.h>
-#include <telepathy-glib/util.h>
+#ifdef HAVE_CHEESE
+#include <cheese-gtk.h>
+#endif
 
-#include <libempathy/empathy-utils.h>
-#include <libempathy/empathy-connection-managers.h>
-#include <libempathy-gtk/empathy-ui-utils.h>
+#include "libempathy/empathy-utils.h"
+#include "libempathy-gtk/empathy-ui-utils.h"
 
-#include "empathy-accounts.h"
 #include "empathy-accounts-common.h"
-#include "empathy-accounts-dialog.h"
 
 #define DEBUG_FLAG EMPATHY_DEBUG_ACCOUNT
-#include <libempathy/empathy-debug.h>
+#include "libempathy/empathy-debug.h"
 
 #define EMPATHY_ACCOUNTS_DBUS_NAME "org.gnome.EmpathyAccounts"
 
@@ -73,7 +66,7 @@ find_account (TpAccountManager *mgr,
   GList *accounts, *l;
   TpAccount *found = NULL;
 
-  accounts = tp_account_manager_get_valid_accounts (mgr);
+  accounts = tp_account_manager_dup_valid_accounts (mgr);
   for (l = accounts; l != NULL; l = g_list_next (l))
     {
       if (!tp_strdiff (tp_proxy_get_object_path (l->data), path))
@@ -83,7 +76,7 @@ find_account (TpAccountManager *mgr,
         }
     }
 
-  g_list_free (accounts);
+  g_list_free_full (accounts, g_object_unref);
   return found;
 }
 
@@ -195,6 +188,7 @@ local_cmdline (GApplication *app,
   optcontext = g_option_context_new (N_("- Empathy Accounts"));
   g_option_context_add_group (optcontext, gtk_get_option_group (TRUE));
   g_option_context_add_main_entries (optcontext, options, GETTEXT_PACKAGE);
+  g_option_context_set_translation_domain (optcontext, GETTEXT_PACKAGE);
 
   argv = *arguments;
   for (i = 0; argv[i] != NULL; i++)
@@ -222,7 +216,13 @@ main (int argc, char *argv[])
   GObjectClass *app_class;
   gint retval;
 
-  g_thread_init (NULL);
+  g_type_init ();
+
+#ifdef HAVE_CHEESE
+  /* Used by the avatar chooser */
+  g_return_val_if_fail (cheese_gtk_init (&argc, &argv), 1);
+#endif
+
   empathy_init ();
 
   gtk_init (&argc, &argv);
@@ -233,7 +233,6 @@ main (int argc, char *argv[])
   /* Make empathy and empathy-accounts appear as the same app in gnome-shell */
   gdk_set_program_class ("Empathy");
   gtk_window_set_default_icon_name ("empathy");
-  textdomain (GETTEXT_PACKAGE);
 
   app = gtk_application_new (EMPATHY_ACCOUNTS_DBUS_NAME,
       G_APPLICATION_HANDLES_COMMAND_LINE);