aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/eab-config.c
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
committerMilan Crha <mcrha@redhat.com>2011-02-25 23:20:41 +0800
commit1301cf02efdacd20fb5ce3e2554ae15b8f146e8a (patch)
tree8d5f3985a82ec7d330af27ee0a29a79a2f0ecfa3 /addressbook/gui/widgets/eab-config.c
parent1a4be6c521d674c4a60e54203521e2721b81b921 (diff)
downloadgsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.gz
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.bz2
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.lz
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.xz
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.tar.zst
gsoc2013-evolution-1301cf02efdacd20fb5ce3e2554ae15b8f146e8a.zip
Bug #614480 - Avoid using G_TYPE_INSTANCE_GET_PRIVATE repeatedly
Diffstat (limited to 'addressbook/gui/widgets/eab-config.c')
-rw-r--r--addressbook/gui/widgets/eab-config.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c
index 79ba6c8445..e1f841af3f 100644
--- a/addressbook/gui/widgets/eab-config.c
+++ b/addressbook/gui/widgets/eab-config.c
@@ -32,17 +32,16 @@ struct _EABConfigPrivate {
guint source_changed_id;
};
-#define _PRIVATE(o) (g_type_instance_get_private((GTypeInstance *)o, eab_config_get_type()))
-
static void
-ecp_init (GObject *o)
+ecp_init (EABConfig *cfg)
{
+ cfg->priv = G_TYPE_INSTANCE_GET_PRIVATE (cfg, EAB_TYPE_CONFIG, EABConfigPrivate);
}
static void
ecp_target_free (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE (ec);
+ struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
if (ec->target == t) {
switch (t->type) {
@@ -78,7 +77,7 @@ ecp_source_changed (struct _ESource *source, EConfig *ec)
static void
ecp_set_target (EConfig *ec, EConfigTarget *t)
{
- struct _EABConfigPrivate *p = _PRIVATE (ec);
+ struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv;
((EConfigClass *)ecp_parent_class)->set_target (ec, t);