]> git.0d.be Git - empathy.git/blobdiff - src/empathy-chat.c
include telepathy-glib.h
[empathy.git] / src / empathy-chat.c
index 43ab00270de142bf8cd02c34dc83353380c38bad..0f7173a9c02266ac43765923620268e4f194aab9 100644 (file)
@@ -28,9 +28,8 @@
 
 #include <libnotify/notify.h>
 
-#include <telepathy-glib/debug-sender.h>
-
 #include <libempathy/empathy-presence-manager.h>
+#include <libempathy/empathy-individual-manager.h>
 
 #include <libempathy-gtk/empathy-theme-manager.h>
 #include <libempathy-gtk/empathy-ui-utils.h>
@@ -100,13 +99,12 @@ main (int argc,
   EmpathyPresenceManager *presence_mgr;
   EmpathyThemeManager *theme_mgr;
   gint retval;
-
-  /* Init */
-  g_thread_init (NULL);
+  EmpathyIndividualManager *individual_mgr;
 
   optcontext = g_option_context_new (N_("- Empathy Chat Client"));
   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);
 
   if (!g_option_context_parse (optcontext, &argc, &argv, &error))
     {
@@ -143,6 +141,10 @@ main (int argc,
   /* Keep the theme manager alive as it does some caching */
   theme_mgr = empathy_theme_manager_dup_singleton ();
 
+  /* Keep the individual manager alive so we won't fetch everything from Folks
+   * each time we need to use it. */
+  individual_mgr = empathy_individual_manager_dup_singleton ();
+
   if (g_getenv ("EMPATHY_PERSIST") != NULL)
     {
       DEBUG ("Disable timer");
@@ -163,6 +165,7 @@ main (int argc,
   g_object_unref (presence_mgr);
   g_object_unref (theme_mgr);
   tp_clear_object (&chat_mgr);
+  g_object_unref (individual_mgr);
 
 #ifdef ENABLE_DEBUG
   g_object_unref (debug_sender);