[gnome-music/wip/mschraal/coresong-thumbnail-prop: 2/8] smoothscale: Remove update timeout on seek



commit fd4b80a4357e9a32f18f4ec069cd3165a536ea35
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Nov 27 16:56:27 2019 +0100

    smoothscale: Remove update timeout on seek
    
    A GStreamer seek is async, so stop the scale update while the actual
    seek is in progress and restart it when it is finished.

 gnomemusic/widgets/smoothscale.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index c17b315d..b53469e2 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -121,6 +121,8 @@ class SmoothScale(Gtk.Scale):
     def _on_smooth_scale_seek_finish(self, value):
         """Prevent stutters when seeking with infinitesimal amounts"""
         self._seek_timeout = None
+        self._remove_timeout()
+
         round_digits = self.props.round_digits
         if self._old_smooth_scale_value != round(value, round_digits):
             self._on_smooth_scale_change_value(self)


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