[gnome-music/wip/mschraal/texturecache-memory-size-improvements: 4/9] texturecache: Refer to classwide variable with classname
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/texturecache-memory-size-improvements: 4/9] texturecache: Refer to classwide variable with classname
- Date: Wed, 20 Apr 2022 21:34:30 +0000 (UTC)
commit a785fa3db3147e65757b9668ccccc2e98f01a13a
Author: Marinus Schraal <mschraal gnome org>
Date: Tue Apr 19 10:36:44 2022 +0200
texturecache: Refer to classwide variable with classname
gnomemusic/texturecache.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/texturecache.py b/gnomemusic/texturecache.py
index 2d1edadfd..df0e1b14f 100644
--- a/gnomemusic/texturecache.py
+++ b/gnomemusic/texturecache.py
@@ -78,8 +78,8 @@ class TextureCache(GObject.GObject):
self.clear_pending_lookup_callback()
- if uri in self._textures.keys():
- self.emit("texture", self._textures[uri])
+ if uri in TextureCache._textures.keys():
+ self.emit("texture", TextureCache._textures[uri])
return
self._art_loader = MediaArtLoader()
@@ -90,7 +90,7 @@ class TextureCache(GObject.GObject):
def _on_art_loading_finished(
self, art_loader: MediaArtLoader, texture: Gdk.Texture) -> None:
if texture:
- self._textures[self._uri] = texture
+ TextureCache._textures[self._uri] = texture
self.emit("texture", texture)
else:
self.emit("texture", None)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]