[gnome-music/wip/jfelder/smoothscale-first-run] smoothscale: Workaround to update position on first run



commit beafc0e81ada506a8d553139fa6e2f078ea07f0a
Author: Jean Felder <jfelder src gnome org>
Date:   Mon Mar 18 17:22:37 2019 +0100

    smoothscale: Workaround to update position on first run
    
    The first duration and position changes from GstPlayer are not being
    emitted. Hence, the scale position update is not initialized properly
    during the first song.
    
    Updating the position once the duration is correctly set fixes the
    issue.

 gnomemusic/widgets/smoothscale.py | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index 103ff800..7cd40bc9 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -116,6 +116,7 @@ class SmoothScale(Gtk.Scale):
         if duration != -1.:
             self.set_range(0.0, duration * 60)
             self.set_increments(300, 600)
+            self._on_state_change(None, None)
 
     @log
     def _on_smooth_scale_seek_finish(self, value):


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