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-cell-renderer-text.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-cell-renderer-text.c')
-rw-r--r-- | libempathy-gtk/empathy-cell-renderer-text.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-cell-renderer-text.c b/libempathy-gtk/empathy-cell-renderer-text.c index d48de32b8..c31a013aa 100644 --- a/libempathy-gtk/empathy-cell-renderer-text.c +++ b/libempathy-gtk/empathy-cell-renderer-text.c @@ -24,11 +24,11 @@ #include <string.h> +#include <libempathy/empathy-utils.h> #include "empathy-cell-renderer-text.h" -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CELL_RENDERER_TEXT, EmpathyCellRendererTextPriv)) - -struct _EmpathyCellRendererTextPriv { +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyCellRendererText) +typedef struct { gchar *name; gchar *status; gboolean is_group; @@ -37,10 +37,8 @@ struct _EmpathyCellRendererTextPriv { gboolean is_selected; gboolean show_status; -}; +} EmpathyCellRendererTextPriv; -static void empathy_cell_renderer_text_class_init (EmpathyCellRendererTextClass *klass); -static void empathy_cell_renderer_text_init (EmpathyCellRendererText *cell); static void cell_renderer_text_finalize (GObject *object); static void cell_renderer_text_get_property (GObject *object, guint param_id, @@ -131,10 +129,10 @@ empathy_cell_renderer_text_class_init (EmpathyCellRendererTextClass *klass) static void empathy_cell_renderer_text_init (EmpathyCellRendererText *cell) { - EmpathyCellRendererTextPriv *priv; - - priv = GET_PRIV (cell); + EmpathyCellRendererTextPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (cell, + EMPATHY_TYPE_CELL_RENDERER_TEXT, EmpathyCellRendererTextPriv); + cell->priv = priv; g_object_set (cell, "ellipsize", PANGO_ELLIPSIZE_END, NULL); |