[gnome-music/wip/mschraal/albumview-covers-on-demand: 5/5] albumsview: Re-add timeout based cover loading
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/albumview-covers-on-demand: 5/5] albumsview: Re-add timeout based cover loading
- Date: Fri, 25 Oct 2019 14:09:25 +0000 (UTC)
commit 7ddeaff1ec80558923e5aca1bc061c2b807b941e
Author: Marinus Schraal <mschraal gnome org>
Date: Sun Oct 20 16:33:07 2019 +0200
albumsview: Re-add timeout based cover loading
Besides on demand loading, a slow timeout based loading is added. This
will eventually lookup all covers to aid a visual search.
gnomemusic/views/albumsview.py | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/gnomemusic/views/albumsview.py b/gnomemusic/views/albumsview.py
index 6f91cc07..ac782d49 100644
--- a/gnomemusic/views/albumsview.py
+++ b/gnomemusic/views/albumsview.py
@@ -66,6 +66,7 @@ class AlbumsView(Gtk.Stack):
self._headerbar = self._window._headerbar
self._timeout_id = None
self._viewport = self._scrolled_window.get_child()
+ self._widget_counter = 1
model = self._window._app.props.coremodel.props.albums_sort
self._flowbox.bind_model(model, self._create_widget)
@@ -165,6 +166,11 @@ class AlbumsView(Gtk.Stack):
"selected", corealbum, "selected",
GObject.BindingFlags.BIDIRECTIONAL)
+ GLib.timeout_add(
+ self._widget_counter * 250, album_widget.retrieve,
+ priority=GLib.PRIORITY_LOW)
+ self._widget_counter = self._widget_counter + 1
+
return album_widget
def _back_button_clicked(self, widget, data=None):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]