From be75994cb9e34664e01966926634ddfa91096511 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Thu, 28 Jul 2016 16:02:05 -0400 Subject: [PATCH] clip: Reimplement look_child and iterate over children if needed Otherwise in the case where children reimplement lookup_child to handle some property renaming lookup fails. --- ges/ges-clip.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ges/ges-clip.c b/ges/ges-clip.c index 7443848..b5f29a2 100644 --- a/ges/ges-clip.c +++ b/ges/ges-clip.c @@ -691,6 +691,23 @@ _paste (GESTimelineElement * element, GESTimelineElement * ref, return GES_TIMELINE_ELEMENT (nclip); } +static gboolean +_lookup_child (GESTimelineElement * self, const gchar * prop_name, + GObject ** child, GParamSpec ** pspec) +{ + GList *tmp; + + if (GES_TIMELINE_ELEMENT_CLASS (ges_clip_parent_class)->lookup_child (self, + prop_name, child, pspec)) + return TRUE; + + for (tmp = GES_CONTAINER_CHILDREN (self); tmp; tmp = tmp->next) { + if (ges_timeline_element_lookup_child (tmp->data, prop_name, child, pspec)) + return TRUE; + } + + return FALSE; +} /**************************************************** * * @@ -793,6 +810,7 @@ ges_clip_class_init (GESClipClass * klass) element_class->set_max_duration = _set_max_duration; element_class->paste = _paste; element_class->deep_copy = _deep_copy; + element_class->lookup_child = _lookup_child; container_class->add_child = _add_child; container_class->remove_child = _remove_child; -- 2.7.4