[gnome-music/wip/mschraal/core-thumb-property: 5/16] artistartstack: Remove DefaultIcon use
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core-thumb-property: 5/16] artistartstack: Remove DefaultIcon use
- Date: Sun, 14 Jun 2020 22:22:28 +0000 (UTC)
commit 6c88399870d9fd11007f4b1751e944cd63584960
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Apr 5 21:57:06 2020 +0200
artistartstack: Remove DefaultIcon use
It is not necessary here and a bit out of place.
gnomemusic/widgets/artistartstack.py | 17 +++--------------
1 file changed, 3 insertions(+), 14 deletions(-)
---
diff --git a/gnomemusic/widgets/artistartstack.py b/gnomemusic/widgets/artistartstack.py
index 2e2f0d23..75eb5652 100644
--- a/gnomemusic/widgets/artistartstack.py
+++ b/gnomemusic/widgets/artistartstack.py
@@ -25,7 +25,7 @@
from gi.repository import GObject, Gtk
from gnomemusic.albumartcache import Art
-from gnomemusic.artcache import ArtCache, DefaultIcon
+from gnomemusic.artcache import ArtCache
from gnomemusic.coreartist import CoreArtist
@@ -39,8 +39,6 @@ class ArtistArtStack(Gtk.Stack):
__gtype_name__ = "ArtistArtStack"
- _default_icon = DefaultIcon()
-
def __init__(self, size=Art.Size.MEDIUM):
"""Initialize the CoverStack
@@ -53,19 +51,15 @@ class ArtistArtStack(Gtk.Stack):
self._size = None
self._timeout = None
- self._loading_cover = Gtk.Image()
self._cover_a = Gtk.Image()
self._cover_b = Gtk.Image()
- self.add_named(self._loading_cover, "loading")
self.add_named(self._cover_a, "A")
self.add_named(self._cover_b, "B")
- self._active_child = "loading"
-
self.props.size = size
self.props.transition_type = Gtk.StackTransitionType.CROSSFADE
- self.props.visible_child_name = "loading"
+ self.props.visible_child_name = "A"
self.connect("destroy", self._on_destroy)
@@ -88,11 +82,6 @@ class ArtistArtStack(Gtk.Stack):
"""
self._size = value
- icon = self._default_icon.get(
- DefaultIcon.Type.LOADING, self.props.size,
- self.props.scale_factor, round_shape=True)
- self._loading_cover.props.surface = icon
-
@GObject.Property(type=CoreArtist, default=None)
def coreartist(self):
return self._coreartist
@@ -116,7 +105,7 @@ class ArtistArtStack(Gtk.Stack):
self._cache.query(coreartist)
def _on_cache_result(self, cache, surface):
- if self._active_child == "B":
+ if self.props.visible_child_name == "B":
self._cover_a.props.surface = surface
self.props.visible_child_name = "A"
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]