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 /megaphone/src | |
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 'megaphone/src')
-rw-r--r-- | megaphone/src/megaphone-applet.c | 13 | ||||
-rw-r--r-- | megaphone/src/megaphone-applet.h | 1 |
2 files changed, 7 insertions, 7 deletions
diff --git a/megaphone/src/megaphone-applet.c b/megaphone/src/megaphone-applet.c index 24d3e07cf..5deeb6c98 100644 --- a/megaphone/src/megaphone-applet.c +++ b/megaphone/src/megaphone-applet.c @@ -51,18 +51,15 @@ #define DEBUG_FLAG EMPATHY_DEBUG_OTHER #include <libempathy/empathy-debug.h> -#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), MEGAPHONE_TYPE_APPLET, MegaphoneAppletPriv)) - -typedef struct _MegaphoneAppletPriv MegaphoneAppletPriv; - -struct _MegaphoneAppletPriv { +#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, MegaphoneApplet) +typedef struct { EmpathyContactFactory *factory; GtkWidget *image; gint image_size; EmpathyContact *contact; GConfClient *gconf; guint gconf_cnxn; -}; +} MegaphoneAppletPriv; static void megaphone_applet_finalize (GObject *object); static void megaphone_applet_size_allocate_cb (GtkWidget *widget, @@ -111,8 +108,10 @@ megaphone_applet_class_init (MegaphoneAppletClass *class) static void megaphone_applet_init (MegaphoneApplet *applet) { - MegaphoneAppletPriv *priv = GET_PRIV (applet); + MegaphoneAppletPriv *priv = G_TYPE_INSTANCE_GET_PRIVATE (applet, + MEGAPHONE_TYPE_APPLET, MegaphoneAppletPriv); + applet->priv = priv; priv->factory = empathy_contact_factory_new (); priv->gconf = gconf_client_get_default (); diff --git a/megaphone/src/megaphone-applet.h b/megaphone/src/megaphone-applet.h index bae671d81..47d82a7d0 100644 --- a/megaphone/src/megaphone-applet.h +++ b/megaphone/src/megaphone-applet.h @@ -40,6 +40,7 @@ typedef struct _MegaphoneAppletClass MegaphoneAppletClass; struct _MegaphoneApplet { PanelApplet applet; + gpointer priv; }; struct _MegaphoneAppletClass { |