[pinpoint/wip/speaker-view] update time summary properly



commit bece969d355446bbfa8325529564356a8cd25e26
Author: �yvind Kolås <pippin gimp org>
Date:   Wed Jun 1 02:32:50 2011 +0100

    update time summary properly

 pp-clutter.c |   24 ++++++++++++++++++++----
 1 files changed, 20 insertions(+), 4 deletions(-)
---
diff --git a/pp-clutter.c b/pp-clutter.c
index 85c8c5e..23c35dd 100644
--- a/pp-clutter.c
+++ b/pp-clutter.c
@@ -523,6 +523,7 @@ start (ClutterActor *actor,
     {
       pp_rehearse = FALSE;
     }
+  pp_rehearse_init (); /* zeroes out the new-time */
   show_slide (renderer, TRUE);
   renderer->reset = TRUE;
   return TRUE;
@@ -1112,9 +1113,8 @@ static void leave_slide (ClutterRenderer *renderer,
   PinPointPoint *point = pp_slidep->data;
   ClutterPointData *data = point->data;
 
-  if (pp_rehearse)
-    point->new_duration += g_timer_elapsed (renderer->timer, NULL) -
-                                            renderer->slide_start_time;
+  point->new_duration += g_timer_elapsed (renderer->timer, NULL) -
+                                          renderer->slide_start_time;
 
   if (!point->transition)
     {
@@ -1275,7 +1275,23 @@ static void update_commandline_shading (ClutterRenderer *renderer)
 static gfloat point_time (ClutterRenderer *renderer,
                           PinPointPoint   *point)
 {
-  float time = point->duration != 0.0 ? point->duration : 2.0;
+  GList *iter;
+  float time;
+  gboolean after_current = FALSE;
+
+  for (iter = pp_slides; iter && iter->data != point; iter = iter->next)
+    {
+      if (iter == pp_slidep)
+        after_current = TRUE;
+    }
+
+  time = point->duration != 0.0 ? point->duration : 2.0;
+  if (!after_current)
+    if (point->new_duration != 0.0)
+      time = point->new_duration;
+  /* if before current point, use new time.. if at or after current point
+     use histroic time
+   */
 #if 0
   if (pp_rehearse && pp_slidep && pp_slidep->data == point)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]