[gnome-music/wip/mschraal/core: 30/177] albumwidget2: Set state on start



commit d6bc2af671b8fc29b7493e4302fa1f2b84a8b59a
Author: Marinus Schraal <mschraal gnome org>
Date:   Fri May 10 00:03:58 2019 +0200

    albumwidget2: Set state on start

 gnomemusic/widgets/albumwidget2.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/widgets/albumwidget2.py b/gnomemusic/widgets/albumwidget2.py
index 7b55244b..d3385279 100644
--- a/gnomemusic/widgets/albumwidget2.py
+++ b/gnomemusic/widgets/albumwidget2.py
@@ -134,7 +134,7 @@ class AlbumWidget2(Gtk.EventBox):
             "{} minute", "{} minutes", mins).format(mins)
 
     @log
-    def _on_row_activated(self, klass, value):
+    def _on_row_activated(self, klass, listboxrow):
         old_model = Gtk.ListStore(
             GObject.TYPE_STRING,  # title
             GObject.TYPE_STRING,
@@ -152,8 +152,9 @@ class AlbumWidget2(Gtk.EventBox):
 
         for song in self._model:
             _iter = old_model.insert_with_valuesv(-1, [5], [song.props.media])
-            if song is self._model[value.get_index()]:
+            if song is self._model[listboxrow.get_index()]:
                 activated_iter = _iter
+                listboxrow.get_child().props.state = SongWidget.State.PLAYING
 
         self._player.set_playlist(
             PlayerPlaylist.Type.ALBUM, self._album_name, old_model,


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