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



commit 97a84de104cbdaa15897d691b508955d33fa955d
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..0fa4dc8d 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._update_position_callback()
 
     @log
     def _on_smooth_scale_seek_finish(self, value):


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