Skip to content
Snippets Groups Projects
Commit ad58fee9 authored by Emmanuele Bassi's avatar Emmanuele Bassi Committed by Philip Withnall
Browse files

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.
parent c8abd972
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment