From b96e318f3ae7c6b7c68897e3b4a853bacaef5e70 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 31 Jul 2019 15:27:06 +0100 Subject: [PATCH] docs: Remove priv pointers from the tutorial example We define `ViewerFile` as a final type with fields directly in the instance structure. This means we don't have a `priv` pointer to dereference. --- docs/reference/gobject/tut_gobject.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/reference/gobject/tut_gobject.xml b/docs/reference/gobject/tut_gobject.xml index 161150ebf..947f488d1 100644 --- a/docs/reference/gobject/tut_gobject.xml +++ b/docs/reference/gobject/tut_gobject.xml @@ -485,14 +485,14 @@ viewer_file_set_property (GObject *object, switch (property_id) { case PROP_FILENAME: - g_free (self->priv->filename); - self->priv->filename = g_value_dup_string (value); - g_print ("filename: %s\n", self->priv->filename); + g_free (self->filename); + self->filename = g_value_dup_string (value); + g_print ("filename: %s\n", self->filename); break; case PROP_ZOOM_LEVEL: - self->priv->zoom_level = g_value_get_uint (value); - g_print ("zoom level: %u\n", self->priv->zoom_level); + self->zoom_level = g_value_get_uint (value); + g_print ("zoom level: %u\n", self->zoom_level); break; default: @@ -513,11 +513,11 @@ viewer_file_get_property (GObject *object, switch (property_id) { case PROP_FILENAME: - g_value_set_string (value, self->priv->filename); + g_value_set_string (value, self->filename); break; case PROP_ZOOM_LEVEL: - g_value_set_uint (value, self->priv->zoom_level); + g_value_set_uint (value, self->zoom_level); break; default: