Skip to content

Commit

Permalink
core: Make the CogView.viewport property only readable
Browse files Browse the repository at this point in the history
Remove the G_PARAM_CONSTRUCT flag from the CogView.viewport property,
because it it supposed to be only readable and it the viewport is
set in a separate step separate from view construction by using
cog_viewport_add(). It would be technically possible to allow setting
the viewport at construction time, but that would need some additional
support code it would use G_PARAM_CONSTRUCT_ONLY. For now it is easier
to remove the flag.
  • Loading branch information
aperezdc committed Nov 23, 2023
1 parent 57ae82f commit 24c6be7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/cog-view.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ cog_view_class_init(CogViewClass *klass)
*
* Since: 0.20
*/
s_properties[PROP_VIEWPORT] = g_param_spec_object("viewport", NULL, NULL, G_TYPE_OBJECT,
G_PARAM_READABLE | G_PARAM_CONSTRUCT | G_PARAM_STATIC_STRINGS);
s_properties[PROP_VIEWPORT] =
g_param_spec_object("viewport", NULL, NULL, G_TYPE_OBJECT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);

g_object_class_install_properties(object_class, N_PROPERTIES, s_properties);
}
Expand Down

0 comments on commit 24c6be7

Please sign in to comment.