[gnome-music/wip/jfelder/albumwidget-cleanup: 2/2] albumwidget: Rename update method parameter to album
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/albumwidget-cleanup: 2/2] albumwidget: Rename update method parameter to album
- Date: Wed, 12 Sep 2018 11:55:50 +0000 (UTC)
commit 56a6cf1990ef89b2fd846d1705fe3062a843e0ea
Author: Jean Felder <jfelder src gnome org>
Date: Tue Sep 11 00:07:36 2018 +0200
albumwidget: Rename update method parameter to album
This should help avoid any confusion.
gnomemusic/widgets/albumwidget.py | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/gnomemusic/widgets/albumwidget.py b/gnomemusic/widgets/albumwidget.py
index 7586a096..fd10af80 100644
--- a/gnomemusic/widgets/albumwidget.py
+++ b/gnomemusic/widgets/albumwidget.py
@@ -113,10 +113,10 @@ class AlbumWidget(Gtk.EventBox):
)
@log
- def update(self, item):
+ def update(self, album):
"""Update the album widget.
- :param item: The grilo media item
+ :param Grl.Media album: The grilo media album
"""
# reset view
self._songs = []
@@ -125,25 +125,25 @@ class AlbumWidget(Gtk.EventBox):
self._disc_listbox.remove(widget)
self._duration = 0
- art = ArtImage(Art.Size.LARGE, item)
+ art = ArtImage(Art.Size.LARGE, album)
art.image = self._cover
- self._album_id = item.get_id()
+ self._album_id = album.get_id()
- album_name = utils.get_album_title(item)
+ album_name = utils.get_album_title(album)
self._title_label.props.label = album_name
self._title_label.props.tooltip_text = album_name
- artist = utils.get_artist_name(item)
+ artist = utils.get_artist_name(album)
self._artist_label.props.label = artist
self._artist_label.props.tooltip_text = artist
- year = utils.get_media_year(item)
+ year = utils.get_media_year(album)
if not year:
year = '----'
self._released_info_label.props.label = year
- self._set_composer_label(item)
+ self._set_composer_label(album)
self._player.connect('song-changed', self._update_model)
@@ -156,7 +156,7 @@ class AlbumWidget(Gtk.EventBox):
self.add_item(None, None, None, 0)
self._update_model(self._player)
else:
- GLib.idle_add(grilo.populate_album_songs, item, self.add_item)
+ GLib.idle_add(grilo.populate_album_songs, album, self.add_item)
@log
def _set_composer_label(self, item):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]