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-tp-contact-list.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-tp-contact-list.c')
-rw-r--r-- | libempathy/empathy-tp-contact-list.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libempathy/empathy-tp-contact-list.c b/libempathy/empathy-tp-contact-list.c index b40042513..9fb5c0402 100644 --- a/libempathy/empathy-tp-contact-list.c +++ b/libempathy/empathy-tp-contact-list.c @@ -38,10 +38,8 @@ #define DEBUG_FLAG EMPATHY_DEBUG_TP | EMPATHY_DEBUG_CONTACT #include "empathy-debug.h" -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - EMPATHY_TYPE_TP_CONTACT_LIST, EmpathyTpContactListPriv)) - -struct _EmpathyTpContactListPriv { +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyTpContactList) +typedef struct { McAccount *account; TpConnection *connection; const gchar *protocol_group; @@ -54,7 +52,7 @@ struct _EmpathyTpContactListPriv { GList *groups; GHashTable *contacts_groups; -}; +} EmpathyTpContactListPriv; typedef enum { TP_CONTACT_LIST_TYPE_PUBLISH, @@ -62,8 +60,6 @@ typedef enum { TP_CONTACT_LIST_TYPE_UNKNOWN } TpContactListType; -static void empathy_tp_contact_list_class_init (EmpathyTpContactListClass *klass); -static void empathy_tp_contact_list_init (EmpathyTpContactList *list); static void tp_contact_list_iface_init (EmpathyContactListIface *iface); enum { @@ -742,8 +738,10 @@ empathy_tp_contact_list_class_init (EmpathyTpContactListClass *klass) static void empathy_tp_contact_list_init (EmpathyTpContactList *list) { - EmpathyTpContactListPriv *priv = GET_PRIV (list); + EmpathyTpContactListPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (list, + EMPATHY_TYPE_TP_CONTACT_LIST, EmpathyTpContactListPriv); + list->priv = priv; priv->contacts_groups = g_hash_table_new_full (g_direct_hash, g_direct_equal, (GDestroyNotify) g_object_unref, |