From 17b765bfb5e2a4d4b943956735b6d1a0e607e4da Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Sat, 12 Jan 2013 10:50:24 -0300 Subject: [PATCH] xmlformatter: Do no allow saving CONSTRUCTONLY properties --- ges/ges-timeline-object.h | 4 ++-- ges/ges-xml-formatter.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ges/ges-timeline-object.h b/ges/ges-timeline-object.h index 173f379da7..8d4a327393 100644 --- a/ges/ges-timeline-object.h +++ b/ges/ges-timeline-object.h @@ -142,10 +142,10 @@ typedef GList * (*GESCreateTrackObjectsFunc) (GESTimelineObject * object, GESTra /** * GESTimelineObject: - * - * The #GESTimelineObject base class. * @trackobjects: (element-type GES.TrackObject): A list of TrackObject * controlled by this TimelineObject sorted by priority. NOTE: Do not modify. + * + * The #GESTimelineObject base class. */ struct _GESTimelineObject { diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index be798a8d43..bd2b663091 100644 --- a/ges/ges-xml-formatter.c +++ b/ges/ges-xml-formatter.c @@ -665,7 +665,7 @@ append_printf_escaped (GString * str, const gchar * format, ...) static inline gboolean _can_serialize_spec (GParamSpec * spec) { - if (spec->flags & G_PARAM_WRITABLE + if (spec->flags & G_PARAM_WRITABLE && !(spec->flags & G_PARAM_CONSTRUCT_ONLY) && !g_type_is_a (G_PARAM_SPEC_VALUE_TYPE (spec), G_TYPE_OBJECT) && g_strcmp0 (spec->name, "name") && G_PARAM_SPEC_VALUE_TYPE (spec) != G_TYPE_GTYPE)