From f5aee5df5733f2c05d591b4c6eea6443d8a0ca49 Mon Sep 17 00:00:00 2001 From: Thibault Saunier Date: Tue, 25 Jun 2013 18:32:49 -0400 Subject: [PATCH] container: Make initiated_move a read only protected member It is a interesting information for subclasses. Conflicts: ges/ges-container.c --- ges/ges-container.c | 17 ++++++++--------- ges/ges-container.h | 4 ++++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/ges/ges-container.c b/ges/ges-container.c index 0f0309df87..15ff296f12 100644 --- a/ges/ges-container.c +++ b/ges/ges-container.c @@ -79,7 +79,6 @@ struct _GESContainerPrivate GESChildrenControlMode children_control_mode; GHashTable *mappings; guint nb_effects; - GESTimelineElement *initiated_move; }; enum @@ -201,7 +200,7 @@ _set_inpoint (GESTimelineElement * element, GstClockTime inpoint) GESTimelineElement *child = (GESTimelineElement *) tmp->data; ChildMapping *map = g_hash_table_lookup (container->priv->mappings, child); - if (child == container->priv->initiated_move) { + if (child == container->initiated_move) { map->inpoint_offset = inpoint - _INPOINT (child); continue; } @@ -227,7 +226,7 @@ _set_duration (GESTimelineElement * element, GstClockTime duration) GESTimelineElement *child = (GESTimelineElement *) tmp->data; ChildMapping *map = g_hash_table_lookup (priv->mappings, child); - if (child == container->priv->initiated_move) { + if (child == container->initiated_move) { map->duration_offset = duration - _DURATION (child); continue; } @@ -436,9 +435,9 @@ _child_start_changed_cb (GESTimelineElement * child, "involve our start becoming < 0. In that case, undo the child move."); /* We update all the children calling our set_start method */ - container->priv->initiated_move = child; + container->initiated_move = child; _set_start0 (element, _START (child) + map->start_offset); - container->priv->initiated_move = NULL; + container->initiated_move = NULL; } static void @@ -457,9 +456,9 @@ _child_inpoint_changed_cb (GESTimelineElement * child, g_assert (map); /* We update all the children calling our set_inpoint method */ - container->priv->initiated_move = child; + container->initiated_move = child; _set_inpoint0 (element, _INPOINT (child) + map->inpoint_offset); - container->priv->initiated_move = NULL; + container->initiated_move = NULL; } static void @@ -478,9 +477,9 @@ _child_duration_changed_cb (GESTimelineElement * child, g_assert (map); /* We update all the children calling our set_duration method */ - container->priv->initiated_move = child; + container->initiated_move = child; _set_duration0 (element, _DURATION (child) + map->duration_offset); - container->priv->initiated_move = NULL; + container->initiated_move = NULL; } static void diff --git a/ges/ges-container.h b/ges/ges-container.h index 34712c2553..d313c04dbb 100644 --- a/ges/ges-container.h +++ b/ges/ges-container.h @@ -83,6 +83,10 @@ struct _GESContainer * readability purposes */ guint32 height; /* the span of priorities this object needs */ + /* */ + /*< readonly >*/ + GESTimelineElement *initiated_move; + /*< private >*/ GESContainerPrivate *priv;