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



commit c604469fdb3607a13f06c5ae11d706ee746194f3
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 position 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]