[gnome-music/wip/mschraal/assorted-cleanups: 3/12] artistartstack: Remove obsolete code



commit 3fe41a5a9b5f5cbc6e27786271939af57a42d64e
Author: Marinus Schraal <mschraal gnome org>
Date:   Tue Dec 24 17:55:51 2019 +0100

    artistartstack: Remove obsolete code
    
    This was copied from CoverStack when creating this code, but never got
    used.

 gnomemusic/widgets/artistartstack.py | 43 ------------------------------------
 1 file changed, 43 deletions(-)
---
diff --git a/gnomemusic/widgets/artistartstack.py b/gnomemusic/widgets/artistartstack.py
index 103a3596..fffbc816 100644
--- a/gnomemusic/widgets/artistartstack.py
+++ b/gnomemusic/widgets/artistartstack.py
@@ -117,46 +117,3 @@ class ArtistArtStack(Gtk.Stack):
         else:
             self._cover_b.props.surface = surface
             self.props.visible_child_name = "B"
-
-    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
-        self._timeout = None
-
-        return GLib.SOURCE_REMOVE
-
-    def _art_retrieved(self, klass):
-        if self._timeout:
-            GLib.source_remove(self._timeout)
-            self._timeout = None
-
-        if self._active_child == "B":
-            self._cover_a.props.surface = klass.surface
-            self.props.visible_child_name = "A"
-        else:
-            self._cover_b.props.surface = klass.surface
-            self.props.visible_child_name = "B"
-
-        self._active_child = self.props.visible_child_name
-        self._art = None


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