[gnome-music/wip/mschraal/coresong-thumbnail-prop: 18/35] artistartstack: Remove obsolete code



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

    artistartstack: Remove obsolete code

 gnomemusic/widgets/artistartstack.py | 46 ------------------------------------
 1 file changed, 46 deletions(-)
---
diff --git a/gnomemusic/widgets/artistartstack.py b/gnomemusic/widgets/artistartstack.py
index a88a6abe..7495c876 100644
--- a/gnomemusic/widgets/artistartstack.py
+++ b/gnomemusic/widgets/artistartstack.py
@@ -122,49 +122,3 @@ class ArtistArtStack(Gtk.Stack):
         else:
             self._cover_b.props.surface = surface
             self.props.visible_child_name = "B"
-
-    @log
-    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()
-
-    @log
-    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
-
-    @log
-    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]