summaryrefslogtreecommitdiff
path: root/service/dconf-writer.c
diff options
context:
space:
mode:
authorPhilip Withnall <withnall@endlessm.com>2018-08-01 10:23:13 +0100
committerPhilip Withnall <withnall@endlessm.com>2018-08-01 10:23:13 +0100
commit038fec9f8ecc4059d3ac993e35b7e5b01ed27c1b (patch)
tree0ef1549043061554ee2d488983fbc111718ff959 /service/dconf-writer.c
parent5a1e35b3c2a228f80125e7e1c1e486d2e3468007 (diff)
downloaddconf-038fec9f8ecc4059d3ac993e35b7e5b01ed27c1b.tar.gz
service: Port from g_type_class_add_private() to G_ADD_PRIVATE()
The former has been deprecated for a long time. Signed-off-by: Philip Withnall <withnall@endlessm.com>
Diffstat (limited to 'service/dconf-writer.c')
-rw-r--r--service/dconf-writer.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/service/dconf-writer.c b/service/dconf-writer.c
index f85300c..00d34fe 100644
--- a/service/dconf-writer.c
+++ b/service/dconf-writer.c
@@ -59,6 +59,7 @@ typedef struct
static void dconf_writer_iface_init (DConfDBusWriterIface *iface);
G_DEFINE_TYPE_WITH_CODE (DConfWriter, dconf_writer, DCONF_DBUS_TYPE_WRITER_SKELETON,
+ G_ADD_PRIVATE (DConfWriter)
G_IMPLEMENT_INTERFACE (DCONF_DBUS_TYPE_WRITER, dconf_writer_iface_init))
static void
@@ -343,7 +344,7 @@ dconf_writer_iface_init (DConfDBusWriterIface *iface)
static void
dconf_writer_init (DConfWriter *writer)
{
- writer->priv = G_TYPE_INSTANCE_GET_PRIVATE (writer, DCONF_TYPE_WRITER, DConfWriterPrivate);
+ writer->priv = dconf_writer_get_instance_private (writer);
writer->priv->basepath = g_build_filename (g_get_user_config_dir (), "dconf", NULL);
writer->priv->native = TRUE;
}
@@ -379,8 +380,6 @@ dconf_writer_class_init (DConfWriterClass *class)
g_param_spec_string ("name", "name", "name", NULL,
G_PARAM_STATIC_STRINGS | G_PARAM_CONSTRUCT_ONLY |
G_PARAM_WRITABLE));
-
- g_type_class_add_private (class, sizeof (DConfWriterPrivate));
}
void