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-presence-chooser.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-presence-chooser.c')
-rw-r--r-- | libempathy-gtk/empathy-presence-chooser.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c index d22eee993..0af2238df 100644 --- a/libempathy-gtk/empathy-presence-chooser.c +++ b/libempathy-gtk/empathy-presence-chooser.c @@ -42,11 +42,10 @@ #include "empathy-images.h" #include "empathy-presence-chooser.h" -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), EMPATHY_TYPE_PRESENCE_CHOOSER, EmpathyPresenceChooserPriv)) - /* Flashing delay for icons (milliseconds). */ #define FLASH_TIMEOUT 500 +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyPresenceChooser) typedef struct { EmpathyIdle *idle; @@ -97,8 +96,6 @@ static guint states[] = {MC_PRESENCE_AVAILABLE, TRUE, MC_PRESENCE_HIDDEN, FALSE, MC_PRESENCE_OFFLINE, FALSE}; -static void empathy_presence_chooser_class_init (EmpathyPresenceChooserClass *klass); -static void empathy_presence_chooser_init (EmpathyPresenceChooser *chooser); static void presence_chooser_finalize (GObject *object); static void presence_chooser_presence_changed_cb (EmpathyPresenceChooser *chooser); static void presence_chooser_reset_scroll_timeout (EmpathyPresenceChooser *chooser); @@ -159,12 +156,12 @@ empathy_presence_chooser_class_init (EmpathyPresenceChooserClass *klass) static void empathy_presence_chooser_init (EmpathyPresenceChooser *chooser) { - EmpathyPresenceChooserPriv *priv; - GtkWidget *arrow; - GtkWidget *alignment; - - priv = GET_PRIV (chooser); + GtkWidget *arrow; + GtkWidget *alignment; + EmpathyPresenceChooserPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (chooser, + EMPATHY_TYPE_PRESENCE_CHOOSER, EmpathyPresenceChooserPriv); + chooser->priv = priv; gtk_button_set_relief (GTK_BUTTON (chooser), GTK_RELIEF_NONE); gtk_button_set_focus_on_click (GTK_BUTTON (chooser), FALSE); |