[gnome-music/wip/mschraal/coresong-thumbnail-prop: 17/21] artistalbumwidget: Drop old coverstack use



commit 1b6f78f6224642ffee910f88b68dccd11ab34444
Author: Marinus Schraal <mschraal gnome org>
Date:   Tue Dec 24 17:03:54 2019 +0100

    artistalbumwidget: Drop old coverstack use

 gnomemusic/widgets/artistalbumwidget.py |  3 ++-
 gnomemusic/widgets/coverstack.py        | 21 ---------------------
 2 files changed, 2 insertions(+), 22 deletions(-)
---
diff --git a/gnomemusic/widgets/artistalbumwidget.py b/gnomemusic/widgets/artistalbumwidget.py
index 2c7e5d73..3b54e2ed 100644
--- a/gnomemusic/widgets/artistalbumwidget.py
+++ b/gnomemusic/widgets/artistalbumwidget.py
@@ -59,7 +59,8 @@ class ArtistAlbumWidget(Gtk.Box):
         self._selection_mode_allowed = selection_mode_allowed
 
         self._cover_stack.props.size = Art.Size.MEDIUM
-        self._cover_stack.update(corealbum)
+        # self._cover_stack.update(corealbum)
+        self._cover_stack.props.corealbum = corealbum
 
         allowed = self._selection_mode_allowed
         self._disc_list_box.props.selection_mode_allowed = allowed
diff --git a/gnomemusic/widgets/coverstack.py b/gnomemusic/widgets/coverstack.py
index 80610852..171b51da 100644
--- a/gnomemusic/widgets/coverstack.py
+++ b/gnomemusic/widgets/coverstack.py
@@ -112,27 +112,6 @@ class CoverStack(Gtk.Stack):
         art.connect("result", self._on_media_art_retrieved)
         art.query(self._corealbum)
 
-    def update(self, coresong):
-        """Update the stack with the given CoreSong
-
-        Update the stack with the art retrieved from the given Coresong.
-        :param CoreSong coresong: The CoreSong object
-        """
-        if self._handler_id and self._art:
-            # Remove a possible dangling 'finished' callback if update
-            # is called again, but it is still looking for the previous
-            # art.
-            self._art.disconnect(self._handler_id)
-            # Set the loading state only after a delay to make between
-            # song transitions smooth if loading time is negligible.
-            self._timeout = GLib.timeout_add(100, self._set_loading_child)
-
-        self._active_child = self.props.visible_child_name
-
-        self._art = Art(self.props.size, coresong, self.props.scale_factor)
-        self._handler_id = self._art.connect('finished', self._art_retrieved)
-        self._art.lookup()
-
     def _set_loading_child(self):
         self.props.visible_child_name = "loading"
         self._active_child = self.props.visible_child_name


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]