[gnome-music/wip/jfelder/searchview-new-style: 8/15] artistart: Access Grilo as property
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/searchview-new-style: 8/15] artistart: Access Grilo as property
- Date: Mon, 5 Aug 2019 19:59:35 +0000 (UTC)
commit 445f3e118a390448dc4ffec2ad5499a1156d1ff8
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Aug 4 12:18:28 2019 +0200
artistart: Access Grilo as property
gnomemusic/artistart.py | 6 +++---
gnomemusic/coreartist.py | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/artistart.py b/gnomemusic/artistart.py
index 980c53e7..18a7e1ad 100644
--- a/gnomemusic/artistart.py
+++ b/gnomemusic/artistart.py
@@ -121,10 +121,11 @@ class DefaultIcon(GObject.GObject):
class ArtistArt(GObject.GObject):
- def __init__(self, coreartist):
+ def __init__(self, coreartist, coremodel):
"""Initialize the ArtistArt.
:param CoreArtist coreartist: The coreartist to use
+ :param CoreModel coremodel: The main coremodel
"""
super().__init__()
@@ -134,8 +135,7 @@ class ArtistArt(GObject.GObject):
if self._in_cache():
return
- # FIXME: Ugly.
- grilo = self._coreartist._coremodel._grilo
+ grilo = coremodel.props.grilo
self._coreartist.connect(
"notify::thumbnail", self._on_thumbnail_changed)
diff --git a/gnomemusic/coreartist.py b/gnomemusic/coreartist.py
index 5910e8bb..ff0762d9 100644
--- a/gnomemusic/coreartist.py
+++ b/gnomemusic/coreartist.py
@@ -90,7 +90,7 @@ class CoreArtist(GObject.GObject):
def thumbnail(self):
if self._thumbnail is None:
self._thumbnail = ""
- ArtistArt(self)
+ ArtistArt(self, self._coremodel)
return self._thumbnail
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]