aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy/empathy-contact-manager.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-05-03 22:12:30 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-03 22:12:30 +0800
commit214850e492efd75f8664bbfb98c6dd6bf161aeb6 (patch)
treefb788b71ca6e6b801d9cd257a6b798287735e763 /libempathy/empathy-contact-manager.c
parent563cdc5a284bc85957f60b14048ba6e42a0c7c87 (diff)
downloadgsoc2013-empathy-214850e492efd75f8664bbfb98c6dd6bf161aeb6.tar
gsoc2013-empathy-214850e492efd75f8664bbfb98c6dd6bf161aeb6.tar.gz
gsoc2013-empathy-214850e492efd75f8664bbfb98c6dd6bf161aeb6.tar.bz2
gsoc2013-empathy-214850e492efd75f8664bbfb98c6dd6bf161aeb6.tar.lz
gsoc2013-empathy-214850e492efd75f8664bbfb98c6dd6bf161aeb6.tar.xz
gsoc2013-empathy-214850e492efd75f8664bbfb98c6dd6bf161aeb6.tar.zst
gsoc2013-empathy-214850e492efd75f8664bbfb98c6dd6bf161aeb6.zip
[darcs-to-svn @ Remove EmpathySession and move all programs into src/]
svn path=/trunk/; revision=28
Diffstat (limited to 'libempathy/empathy-contact-manager.c')
-rw-r--r--libempathy/empathy-contact-manager.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c
index cf5a81fe2..50ed576b5 100644
--- a/libempathy/empathy-contact-manager.c
+++ b/libempathy/empathy-contact-manager.c
@@ -28,7 +28,6 @@
#include <libtelepathy/tp-constants.h>
#include "empathy-contact-manager.h"
-#include "empathy-session.h"
#include "gossip-utils.h"
#include "gossip-debug.h"
@@ -175,7 +174,16 @@ contact_manager_finalize (GObject *object)
EmpathyContactManager *
empathy_contact_manager_new (void)
{
- return g_object_new (EMPATHY_TYPE_CONTACT_MANAGER, NULL);
+ static EmpathyContactManager *manager = NULL;
+
+ if (!manager) {
+ manager = g_object_new (EMPATHY_TYPE_CONTACT_MANAGER, NULL);
+ g_object_add_weak_pointer (G_OBJECT (manager), (gpointer) &manager);
+ } else {
+ g_object_ref (manager);
+ }
+
+ return manager;
}
void