[gnome-music/wip/jfelder/smoothscale-player: 4/6] smoothscale: Do not interact with GstPlayer
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/smoothscale-player: 4/6] smoothscale: Do not interact with GstPlayer
- Date: Tue, 9 Oct 2018 22:23:29 +0000 (UTC)
commit 8bb1c8bdd84ae306983974560bdeb964bd5c4d08
Author: Jean Felder <jfelder src gnome org>
Date: Thu Sep 27 09:00:05 2018 +0200
smoothscale: Do not interact with GstPlayer
gnomemusic/player.py | 6 ------
gnomemusic/widgets/playertoolbar.py | 2 +-
gnomemusic/widgets/smoothscale.py | 12 ++++++------
3 files changed, 7 insertions(+), 13 deletions(-)
---
diff --git a/gnomemusic/player.py b/gnomemusic/player.py
index 93fa9260..ac95bd38 100644
--- a/gnomemusic/player.py
+++ b/gnomemusic/player.py
@@ -806,12 +806,6 @@ class Player(GObject.GObject):
"""
return self._playlist.props.playlist_id
- # MPRIS
- @log
- def get_gst_player(self):
- """GstPlayer getter"""
- return self._player
-
@log
def get_position(self):
return self._player.position
diff --git a/gnomemusic/widgets/playertoolbar.py b/gnomemusic/widgets/playertoolbar.py
index d764802f..2d75e5bb 100644
--- a/gnomemusic/widgets/playertoolbar.py
+++ b/gnomemusic/widgets/playertoolbar.py
@@ -71,7 +71,7 @@ class PlayerToolbar(Gtk.ActionBar):
self._main_window = main_window
self._player = player
- self._progress_scale.player = self._player.get_gst_player()
+ self._progress_scale.player = self._player
self._cover_stack.props.size = Art.Size.XSMALL
self._cover_stack.connect('updated', self._on_cover_stack_updated)
diff --git a/gnomemusic/widgets/smoothscale.py b/gnomemusic/widgets/smoothscale.py
index b9d6cb30..628aac21 100644
--- a/gnomemusic/widgets/smoothscale.py
+++ b/gnomemusic/widgets/smoothscale.py
@@ -37,7 +37,7 @@ class SmoothScale(Gtk.Scale):
The progressbar Gtk.Scale, extended with smoothing capabilities, so
the indicator updates every pixel available.
- This class interacts directly with the GstPlayer class.
+ This class interacts directly with the Player class.
"""
__gtype_name__ = 'SmoothScale'
@@ -71,18 +71,18 @@ class SmoothScale(Gtk.Scale):
# object via init when using Gtk.Builder.
@GObject.Property
def player(self):
- """The GstPlayer object used
+ """The Player object used
:return: player object
- :rtype: GstPlayer
+ :rtype: Player
"""
return self._player
@player.setter
def player(self, player):
- """Set the GstPlayer object used
+ """Set the Player object used
- :param GstPlayer player: The GstPlayer to use
+ :param Player player: The Player to use
"""
if (player is None
or (self._player is not None
@@ -213,7 +213,7 @@ class SmoothScale(Gtk.Scale):
@log
def _update_position_callback(self):
- position = self._player.position
+ position = self._player.get_position()
if position > 0:
self.set_value(position * 60)
self._update_timeout()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]