[gnome-music/wip/mschraal/grilo-writeback-sync-fix: 2/2] playertoolbar: Remove clock-tick signal handling



commit 7bad9df14992204b91b93ee4eeceb609b83fc2a2
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu May 2 12:44:22 2019 +0200

    playertoolbar: Remove clock-tick signal handling
    
    The clock-tick signal in Player is 1-on-1 passed on from GstPlayer and only
    used in PlayerToolbar for updating the progression time label.
    PlayerToolbar also listens to SmoothScale for updating the time label,
    duplicating functionality.
    
    Remove clock-tick handling and only use SmoothScale progress indication, as
    clock-tick used to be unreliable anyway (see previous commit) and does not
    actually update with seeking.

 gnomemusic/player.py                | 3 ---
 gnomemusic/widgets/playertoolbar.py | 5 -----
 2 files changed, 8 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index dcdfd5b5..f60eed0a 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -541,7 +541,6 @@ class Player(GObject.GObject):
     """
 
     __gsignals__ = {
-        'clock-tick': (GObject.SignalFlags.RUN_FIRST, None, (int,)),
         'playlist-changed': (GObject.SignalFlags.RUN_FIRST, None, ()),
         'seek-finished': (GObject.SignalFlags.RUN_FIRST, None, (float,)),
         'song-changed': (GObject.SignalFlags.RUN_FIRST, None, (int,)),
@@ -803,8 +802,6 @@ class Player(GObject.GObject):
                 grilo.bump_play_count(current_song)
                 grilo.set_last_played(current_song)
 
-        self.emit('clock-tick', int(position))
-
     @log
     def _on_repeat_setting_changed(self, settings, value):
         self.props.repeat_mode = settings.get_enum('repeat')
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index 12ca9263..3c38f051 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -80,7 +80,6 @@ class PlayerToolbar(Gtk.ActionBar):
 
         self._sync_repeat_image()
 
-        self._player.connect('clock-tick', self._on_clock_tick)
         self._player.connect('song-changed', self._update_view)
         self._player.connect(
             'notify::repeat-mode', self._on_repeat_mode_changed)
@@ -178,10 +177,6 @@ class PlayerToolbar(Gtk.ActionBar):
 
         self._cover_stack.update(current_song)
 
-    @log
-    def _on_clock_tick(self, player, seconds):
-        self._progress_time_label.set_label(utils.seconds_to_string(seconds))
-
     @Gtk.Template.Callback()
     @log
     def _on_tooltip_query(self, widget, x, y, kb, tooltip, data=None):


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