[gnome-music] view: Use a dummy if album art is still loading
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] view: Use a dummy if album art is still loading
- Date: Wed, 28 May 2014 09:47:27 +0000 (UTC)
commit fafbcc5ee655cffb4d783a14b0e798dcb3609905
Author: Arnel Borja <kyoushuu yahoo com>
Date: Wed May 28 17:36:44 2014 +0800
view: Use a dummy if album art is still loading
Use a dummy symbolic icon for album art that are still loading so we
could tell if we have to start a new lookup or not.
gnomemusic/view.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index ce579f1..7b3f96b 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -139,6 +139,8 @@ class ViewContainer(Gtk.Stack):
self.cache = albumArtCache.get_default()
self._symbolicIcon = self.cache.get_default_icon(self._iconHeight,
self._iconWidth)
+ self._symbolicIconLoading = self.cache.get_default_icon(self._iconHeight,
+ self._iconWidth)
self._init = False
grilo.connect('ready', self._on_grilo_ready)
@@ -245,6 +247,7 @@ class ViewContainer(Gtk.Stack):
artist = self._model.get_value(_iter, 3)
thumbnail = self._model.get_value(_iter, 4)
if thumbnail == self._symbolicIcon:
+ self._model.set_value(_iter, 4, self._symbolicIconLoading)
albumArtCache.get_default().lookup(
item, self._iconWidth, self._iconHeight, self._on_lookup_ready,
_iter, artist, title)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]