[gtk+/wip/watson/progress-tracker: 17/28] progressbar: remove weird code



commit 4a876f8607df5ae2ee6d989a811deb136c82d483
Author: Matt Watson <mattdangerw gmail com>
Date:   Mon Mar 28 01:08:48 2016 -0700

    progressbar: remove weird code
    
    I think this is trying to go back to the default pulse duration if
    we haven't received a pulse for more then three times the duration
    between the last two pulses.
    
    But this isn't documented anywhere. It will end up dropping a frame,
    causing a slight stutter in the animation. The animation will
    already be slowing down with the way the fraction update is driven.
    This will just cause a speed change before returning to a slowdown.
    
    I think its better to just ditch this case.

 gtk/gtkprogressbar.c |    6 ------
 1 files changed, 0 insertions(+), 6 deletions(-)
---
diff --git a/gtk/gtkprogressbar.c b/gtk/gtkprogressbar.c
index 352d445..0942234 100644
--- a/gtk/gtkprogressbar.c
+++ b/gtk/gtkprogressbar.c
@@ -1154,12 +1154,6 @@ tick_cb (GtkWidget     *widget,
   g_assert (priv->pulse2 > priv->pulse1);
   g_assert (frame2 > priv->frame1);
 
-  if (frame2 - priv->pulse2 > 3 * (priv->pulse2 - priv->pulse1))
-    {
-      priv->pulse1 = 0;
-      return G_SOURCE_CONTINUE;
-    }
-
   /* Determine the fraction to move the block from one frame
    * to the next when pulse_fraction is how far the block should
    * move between two calls to gtk_progress_bar_pulse().


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