Bug 1181 - In Score, timelines, appended at markers, are also
authorNeil Roberts <neil@openedhand.com>
Tue, 4 Nov 2008 10:40:53 +0000 (10:40 +0000)
committerNeil Roberts <neil@openedhand.com>
Tue, 4 Nov 2008 10:40:53 +0000 (10:40 +0000)
called on complete

* clutter/clutter-score.c (start_children_entries): Use the name
of the marker to start as the data parameter and only start child
timelines that have the same marker name. Previously the
ClutterScore would just start all child entries when a marker was
reached or the timeline completed regardless of whether they were
added with a marker or not. Thanks to Mihail Naydenov for
reporting the bug.

ChangeLog
clutter/clutter-score.c

index 0a16b05..076c17c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2008-11-04  Neil Roberts  <neil@linux.intel.com>
+
+       Bug 1181 - In Score, timelines, appended at markers, are also
+       called on complete
+
+       * clutter/clutter-score.c (start_children_entries): Use the name
+       of the marker to start as the data parameter and only start child
+       timelines that have the same marker name. Previously the
+       ClutterScore would just start all child entries when a marker was
+       reached or the timeline completed regardless of whether they were
+       added with a marker or not. Thanks to Mihail Naydenov for
+       reporting the bug.
+
 2008-11-03  Emmanuele Bassi  <ebassi@linux.intel.com>
 
        * clutter/cogl/gl/Makefile.am: Whitespace fixes.
index 2724379..dfc8443 100644 (file)
@@ -599,7 +599,10 @@ start_children_entries (GNode    *node,
 {
   ClutterScoreEntry *entry = node->data;
 
-  start_entry (entry);
+  /* If data is NULL, start all entries that have no marker, otherwise
+     only start entries that have the same marker */
+  if (data == NULL ? entry->marker == NULL : !strcmp (data, entry->marker))
+    start_entry (entry);
 }
 
 static void
@@ -623,7 +626,7 @@ on_timeline_marker (ClutterTimeline   *timeline,
       g_node_children_foreach (parent,
                                G_TRAVERSE_ALL,
                                start_children_entries,
-                               NULL);
+                               (gpointer) marker_name);
     }
 }