[gnome-music/wip/mschraal/core: 33/70] albumwidget2: Set state on start
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core: 33/70] albumwidget2: Set state on start
- Date: Tue, 18 Jun 2019 15:57:04 +0000 (UTC)
commit 430421d33bfb4cadc503119c0e17823fcd54f33b
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]