]> git.0d.be Git - empathy.git/commitdiff
empathy-chat: keep the individual manager alive as a cache
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Fri, 10 Feb 2012 13:54:19 +0000 (14:54 +0100)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Wed, 15 Feb 2012 09:48:23 +0000 (10:48 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=669676

src/empathy-chat.c

index 43ab00270de142bf8cd02c34dc83353380c38bad..bebca43823a6c5a904b3ee94a91b9218c6ac85f3 100644 (file)
@@ -31,6 +31,7 @@
 #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,6 +101,7 @@ main (int argc,
   EmpathyPresenceManager *presence_mgr;
   EmpathyThemeManager *theme_mgr;
   gint retval;
+  EmpathyIndividualManager *individual_mgr;
 
   /* Init */
   g_thread_init (NULL);
@@ -143,6 +145,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 +169,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);