[gnome-music/wip/jfelder/smoothscale-player: 6/6] gstplayer: Remove state-changed listener



commit e1015480592c26a03a41745991feb50143bdb182
Author: Jean Felder <jfelder src gnome org>
Date:   Tue Oct 9 19:49:59 2018 +0200

    gstplayer: Remove state-changed listener

 gnomemusic/gstplayer.py | 13 -------------
 1 file changed, 13 deletions(-)
---
diff --git a/gnomemusic/gstplayer.py b/gnomemusic/gstplayer.py
index af7ed175..8cb06b5f 100644
--- a/gnomemusic/gstplayer.py
+++ b/gnomemusic/gstplayer.py
@@ -81,7 +81,6 @@ class GstPlayer(GObject.GObject):
         self._on_replaygain_setting_changed(
             None, self._settings.get_value('replaygain'))
 
-        self._bus.connect('message::state-changed', self._on_bus_state_changed)
         self._bus.connect('message::error', self._on_bus_error)
         self._bus.connect('message::element', self._on_bus_element)
         self._bus.connect('message::eos', self._on_bus_eos)
@@ -139,18 +138,6 @@ class GstPlayer(GObject.GObject):
         tick = time / Gst.SECOND
         self.emit('clock-tick', tick)
 
-    @log
-    def _on_bus_state_changed(self, bus, message):
-        # Note: not all state changes are signaled through here, in
-        # particular transitions between Gst.State.READY and
-        # Gst.State.NULL are never async and thus don't cause a
-        # message. In practice, self means only Gst.State.PLAYING and
-        # Gst.State.PAUSED are.
-
-        # Setting self.state triggers the property signal, which is
-        # used down the line.
-        self.state = self.state
-
     @log
     def _on_duration_changed(self, bus, message):
         success, duration = self._player.query_duration(


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