aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-cell-renderer-expander.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-05-06 04:34:41 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-05-06 04:34:41 +0800
commit1557095113a3c0f5baadcfb1e953d73762e5263e (patch)
tree6af706fb1f4f673120981e033768a09169544c11 /libempathy-gtk/empathy-cell-renderer-expander.c
parent62828fac680bd53e0047d9ae2a281c864075c809 (diff)
downloadgsoc2013-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-expander.c')
-rw-r--r--libempathy-gtk/empathy-cell-renderer-expander.c54
1 files changed, 25 insertions, 29 deletions
diff --git a/libempathy-gtk/empathy-cell-renderer-expander.c b/libempathy-gtk/empathy-cell-renderer-expander.c
index 51930ab6a..fc9189d2d 100644
--- a/libempathy-gtk/empathy-cell-renderer-expander.c
+++ b/libempathy-gtk/empathy-cell-renderer-expander.c
@@ -31,12 +31,31 @@
#include <gtk/gtktreeview.h>
+#include <libempathy/empathy-utils.h>
#include "empathy-cell-renderer-expander.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_CELL_RENDERER_EXPANDER, EmpathyCellRendererExpanderPriv))
+#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyCellRendererExpander)
+typedef struct {
+ GtkExpanderStyle expander_style;
+ gint expander_size;
+
+ GtkTreeView *animation_view;
+ GtkTreeRowReference *animation_node;
+ GtkExpanderStyle animation_style;
+ guint animation_timeout;
+ GdkRectangle animation_area;
+
+ guint activatable : 1;
+ guint animation_expanding : 1;
+} EmpathyCellRendererExpanderPriv;
+
+enum {
+ PROP_0,
+ PROP_EXPANDER_STYLE,
+ PROP_EXPANDER_SIZE,
+ PROP_ACTIVATABLE
+};
-static void empathy_cell_renderer_expander_init (EmpathyCellRendererExpander *expander);
-static void empathy_cell_renderer_expander_class_init (EmpathyCellRendererExpanderClass *klass);
static void empathy_cell_renderer_expander_get_property (GObject *object,
guint param_id,
GValue *value,
@@ -68,38 +87,15 @@ static gboolean empathy_cell_renderer_expander_activate (GtkCellRenderer
GdkRectangle *cell_area,
GtkCellRendererState flags);
-enum {
- PROP_0,
- PROP_EXPANDER_STYLE,
- PROP_EXPANDER_SIZE,
- PROP_ACTIVATABLE
-};
-
-typedef struct _EmpathyCellRendererExpanderPriv EmpathyCellRendererExpanderPriv;
-
-struct _EmpathyCellRendererExpanderPriv {
- GtkExpanderStyle expander_style;
- gint expander_size;
-
- GtkTreeView *animation_view;
- GtkTreeRowReference *animation_node;
- GtkExpanderStyle animation_style;
- guint animation_timeout;
- GdkRectangle animation_area;
-
- guint activatable : 1;
- guint animation_expanding : 1;
-};
-
G_DEFINE_TYPE (EmpathyCellRendererExpander, empathy_cell_renderer_expander, GTK_TYPE_CELL_RENDERER)
static void
empathy_cell_renderer_expander_init (EmpathyCellRendererExpander *expander)
{
- EmpathyCellRendererExpanderPriv *priv;
-
- priv = GET_PRIV (expander);
+ EmpathyCellRendererExpanderPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (expander,
+ EMPATHY_TYPE_CELL_RENDERER_EXPANDER, EmpathyCellRendererExpanderPriv);
+ expander->priv = priv;
priv->expander_style = GTK_EXPANDER_COLLAPSED;
priv->expander_size = 12;
priv->activatable = TRUE;