[gnome-music/wip/mschraal/rework-art-widget: 3/18] artstack: Drop unneeded function




commit 6ea2d972221a85887f9f2d10ff4dc2e9f8305875
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Mar 17 16:53:48 2022 +0100

    artstack: Drop unneeded function

 gnomemusic/widgets/artstack.py | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/gnomemusic/widgets/artstack.py b/gnomemusic/widgets/artstack.py
index 47601eac7..1784bc160 100644
--- a/gnomemusic/widgets/artstack.py
+++ b/gnomemusic/widgets/artstack.py
@@ -123,7 +123,7 @@ class ArtStack(Gtk.Stack):
 
         default_icon = DefaultIcon(self).get(self._art_type, self._size)
 
-        self._swap_thumbnails(default_icon)
+        self._cover_a.props.paintable = default_icon
 
     @GObject.Property(type=object, default=None)
     def coreobject(self) -> Optional[CoreObject]:
@@ -137,7 +137,7 @@ class ArtStack(Gtk.Stack):
         self._disconnect_cache()
 
         default_icon = DefaultIcon(self).get(self._art_type, self._size)
-        self._swap_thumbnails(default_icon)
+        self._cover.props.paintable = default_icon
 
         if self._thumbnail_id != 0:
             self._coreobject.disconnect(self._thumbnail_id)
@@ -155,7 +155,7 @@ class ArtStack(Gtk.Stack):
             pspec: GObject.ParamSpecBoolean) -> None:
         default_icon = DefaultIcon(self).get(self._art_type, self._size)
 
-        self._swap_thumbnails(default_icon)
+        self._cover_a.props.paintable = default_icon
 
     def _on_thumbnail_changed(
             self, coreobject: CoreObject,
@@ -167,12 +167,9 @@ class ArtStack(Gtk.Stack):
 
         self._async_queue.queue(self._cache, coreobject, self._size)
 
-    def _swap_thumbnails(self, paintable: Gtk.Paintable) -> None:
-        self._cover_a.props.paintable = paintable
-
     def _on_cache_result(
             self, cache: ArtCache, paintable: Gtk.Paintable) -> None:
-        self._swap_thumbnails(paintable)
+        self._cover_a.props.paintable = paintable
 
     def _on_destroy(self, widget: ArtStack) -> None:
         # If the stack is destroyed while the art is updated, an error


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