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 /src/empathy-status-icon.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 'src/empathy-status-icon.c')
-rw-r--r-- | src/empathy-status-icon.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/empathy-status-icon.c b/src/empathy-status-icon.c index aea68d4ea..bcb1f9f47 100644 --- a/src/empathy-status-icon.c +++ b/src/empathy-status-icon.c @@ -44,15 +44,11 @@ #define DEBUG_FLAG EMPATHY_DEBUG_FILTER #include <libempathy/empathy-debug.h> -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), \ - EMPATHY_TYPE_STATUS_ICON, EmpathyStatusIconPriv)) - /* Number of ms to wait when blinking */ #define BLINK_TIMEOUT 500 -typedef struct _StatusIconEvent StatusIconEvent; - -struct _EmpathyStatusIconPriv { +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyStatusIcon) +typedef struct { GtkStatusIcon *icon; EmpathyIdle *idle; MissionControl *mc; @@ -67,7 +63,7 @@ struct _EmpathyStatusIconPriv { GtkWidget *show_window_item; GtkWidget *message_item; GtkWidget *status_item; -}; +} EmpathyStatusIconPriv; G_DEFINE_TYPE (EmpathyStatusIcon, empathy_status_icon, G_TYPE_OBJECT); @@ -369,8 +365,10 @@ status_icon_status_changed_cb (MissionControl *mc, static void empathy_status_icon_init (EmpathyStatusIcon *icon) { - EmpathyStatusIconPriv *priv = GET_PRIV (icon); + EmpathyStatusIconPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (icon, + EMPATHY_TYPE_STATUS_ICON, EmpathyStatusIconPriv); + icon->priv = priv; priv->icon = gtk_status_icon_new (); priv->mc = empathy_mission_control_new (); priv->idle = empathy_idle_new (); |