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-chatroom.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-chatroom.c')
-rw-r--r-- | libempathy/empathy-chatroom.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/libempathy/empathy-chatroom.c b/libempathy/empathy-chatroom.c index 7b4a3d672..17be191e5 100644 --- a/libempathy/empathy-chatroom.c +++ b/libempathy/empathy-chatroom.c @@ -28,17 +28,15 @@ #include "empathy-chatroom.h" #include "empathy-utils.h" -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CHATROOM, EmpathyChatroomPriv)) - -struct _EmpathyChatroomPriv { +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyChatroom) +typedef struct { McAccount *account; gchar *room; gchar *name; gboolean auto_connect; -}; +} EmpathyChatroomPriv; + -static void empathy_chatroom_class_init (EmpathyChatroomClass *klass); -static void empathy_chatroom_init (EmpathyChatroom *chatroom); static void chatroom_finalize (GObject *object); static void chatroom_get_property (GObject *object, guint param_id, @@ -107,6 +105,10 @@ empathy_chatroom_class_init (EmpathyChatroomClass *klass) static void empathy_chatroom_init (EmpathyChatroom *chatroom) { + EmpathyChatroomPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (chatroom, + EMPATHY_TYPE_CHATROOM, EmpathyChatroomPriv); + + chatroom->priv = priv; } static void |