[gnome-music: 1/4] Extract artist in ArtistAlbumWidget instead of passing it as a constructor parameter
- From: Seif Lotfy <seiflotfy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music: 1/4] Extract artist in ArtistAlbumWidget instead of passing it as a constructor parameter
- Date: Sun, 4 Aug 2013 12:13:54 +0000 (UTC)
commit 4280b5d40799ed47e36c4be569bf08afd73a2350
Author: Seif Lotfy <seif lotfy com>
Date: Sat Aug 3 15:46:50 2013 +0200
Extract artist in ArtistAlbumWidget instead of passing it as a constructor
parameter
Fixes: #703388
gnomemusic/widgets.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 265904e..c2db4e1 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -1,5 +1,6 @@
from gi.repository import Gtk, Gd, GLib, GObject, Pango
from gi.repository import GdkPixbuf
+from gi.repository import Grl
from gi.repository import Tracker
from gettext import gettext as _
from gnomemusic.grilo import grilo
@@ -335,7 +336,7 @@ class ArtistAlbums(Gtk.VBox):
self.player.connect('playlist-item-changed', self.update_model)
def add_album(self, album):
- widget = ArtistAlbumWidget(self.artist, album, self.player, self.model)
+ widget = ArtistAlbumWidget(album, self.player, self.model)
self._albumBox.pack_start(widget, False, False, 0)
self.widgets.append(widget)
@@ -458,11 +459,11 @@ class AllArtistsAlbums(ArtistAlbums):
class ArtistAlbumWidget(Gtk.HBox):
- def __init__(self, artist, album, player, model):
+ def __init__(self, album, player, model):
super(Gtk.HBox, self).__init__()
self.player = player
self.album = album
- self.artist = artist
+ self.artist = album.get_string(Grl.METADATA_KEY_ARTIST)
self.model = model
self.songs = []
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]