[gnome-music/wip/jfelder/searchview-new-style: 16/21] 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: 16/21] artistart: Access Grilo as property
- Date: Mon, 5 Aug 2019 00:19:07 +0000 (UTC)
commit dded5e22ecac2812a6c559b898f98b916a36cd48
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 f08f2a9e..25bb1acb 100644
--- a/gnomemusic/artistart.py
+++ b/gnomemusic/artistart.py
@@ -122,10 +122,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__()
@@ -136,8 +137,7 @@ class ArtistArt(GObject.GObject):
print("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]