diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2008-05-06 04:34:41 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2008-05-06 04:34:41 +0800 |
commit | 1557095113a3c0f5baadcfb1e953d73762e5263e (patch) | |
tree | 6af706fb1f4f673120981e033768a09169544c11 /libempathy/empathy-contact-manager.c | |
parent | 62828fac680bd53e0047d9ae2a281c864075c809 (diff) | |
download | gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.gz gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.bz2 gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.lz gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.xz gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.tar.zst gsoc2013-empathy-1557095113a3c0f5baadcfb1e953d73762e5263e.zip |
Keep a priv pointer in the object struct instead of using G_TYPE_INSTANCE_GET_PRIVATE all the time.
svn path=/trunk/; revision=1082
Diffstat (limited to 'libempathy/empathy-contact-manager.c')
-rw-r--r-- | libempathy/empathy-contact-manager.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/libempathy/empathy-contact-manager.c b/libempathy/empathy-contact-manager.c index cb7fcadc9..48ac1598b 100644 --- a/libempathy/empathy-contact-manager.c +++ b/libempathy/empathy-contact-manager.c @@ -32,17 +32,13 @@ #define DEBUG_FLAG EMPATHY_DEBUG_CONTACT #include "empathy-debug.h" -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - EMPATHY_TYPE_CONTACT_MANAGER, EmpathyContactManagerPriv)) - -struct _EmpathyContactManagerPriv { +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyContactManager) +typedef struct { GHashTable *lists; MissionControl *mc; gpointer token; -}; +} EmpathyContactManagerPriv; -static void empathy_contact_manager_class_init (EmpathyContactManagerClass *klass); -static void empathy_contact_manager_init (EmpathyContactManager *manager); static void contact_manager_iface_init (EmpathyContactListIface *iface); G_DEFINE_TYPE_WITH_CODE (EmpathyContactManager, empathy_contact_manager, G_TYPE_OBJECT, @@ -208,11 +204,11 @@ empathy_contact_manager_class_init (EmpathyContactManagerClass *klass) static void empathy_contact_manager_init (EmpathyContactManager *manager) { - EmpathyContactManagerPriv *priv; GSList *accounts, *l; + EmpathyContactManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, + EMPATHY_TYPE_CONTACT_MANAGER, EmpathyContactManagerPriv); - priv = GET_PRIV (manager); - + manager->priv = priv; priv->lists = g_hash_table_new_full (empathy_account_hash, empathy_account_equal, (GDestroyNotify) g_object_unref, |