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-gtk/empathy-smiley-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-gtk/empathy-smiley-manager.c')
-rw-r--r-- | libempathy-gtk/empathy-smiley-manager.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libempathy-gtk/empathy-smiley-manager.c b/libempathy-gtk/empathy-smiley-manager.c index 7d2a744a1..c9322c8eb 100644 --- a/libempathy-gtk/empathy-smiley-manager.c +++ b/libempathy-gtk/empathy-smiley-manager.c @@ -24,26 +24,24 @@ #include <string.h> +#include <libempathy/empathy-utils.h> #include "empathy-smiley-manager.h" #include "empathy-ui-utils.h" -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - EMPATHY_TYPE_SMILEY_MANAGER, EmpathySmileyManagerPriv)) +typedef struct _SmileyManagerTree SmileyManagerTree; +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathySmileyManager) typedef struct { + SmileyManagerTree *tree; + GSList *smileys; +} EmpathySmileyManagerPriv; + +struct _SmileyManagerTree { gunichar c; GdkPixbuf *pixbuf; GSList *childrens; -} SmileyManagerTree; - -struct _EmpathySmileyManagerPriv { - SmileyManagerTree *tree; - GSList *smileys; }; -static void empathy_smiley_manager_class_init (EmpathySmileyManagerClass *klass); -static void empathy_smiley_manager_init (EmpathySmileyManager *manager); - G_DEFINE_TYPE (EmpathySmileyManager, empathy_smiley_manager, G_TYPE_OBJECT); static SmileyManagerTree * @@ -130,8 +128,10 @@ empathy_smiley_manager_class_init (EmpathySmileyManagerClass *klass) static void empathy_smiley_manager_init (EmpathySmileyManager *manager) { - EmpathySmileyManagerPriv *priv = GET_PRIV (manager); + EmpathySmileyManagerPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (manager, + EMPATHY_TYPE_SMILEY_MANAGER, EmpathySmileyManagerPriv); + manager->priv = priv; priv->tree = smiley_manager_tree_new ('\0'); priv->smileys = NULL; } |