[gnome-music] view: Don't add items on idle
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] view: Don't add items on idle
- Date: Sun, 3 Jan 2016 18:25:53 +0000 (UTC)
commit 2cab31f9bb3e99ccfa96214ee37caf610c6eab80
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Dec 27 14:50:06 2015 +0100
view: Don't add items on idle
Now that we've removed the bottlenecks from these paths, we can
just do this inside the code flow.
https://bugzilla.gnome.org/show_bug.cgi?id=760033
gnomemusic/view.py | 18 ++++++++----------
1 files changed, 8 insertions(+), 10 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index c209eeb..2cbe0a7 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -220,16 +220,14 @@ class ViewContainer(Gtk.Stack):
title = albumArtCache.get_media_title(item)
# item.set_title(title)
- def add_new_item():
- _iter = self.model.append(None)
- self.model.set(_iter,
- [0, 1, 2, 3, 4, 5, 7, 9],
- [str(item.get_id()), '', title,
- artist, self._loadingIcon, item,
- 0, False])
- self.cache.lookup(item, self._iconWidth, self._iconHeight, self._on_lookup_ready,
- _iter, artist, title)
- GLib.idle_add(add_new_item)
+ _iter = self.model.append(None)
+ self.model.set(_iter,
+ [0, 1, 2, 3, 4, 5, 7, 9],
+ [str(item.get_id()), '', title,
+ artist, self._loadingIcon, item,
+ 0, False])
+ self.cache.lookup(item, self._iconWidth, self._iconHeight, self._on_lookup_ready,
+ _iter, artist, title)
@log
def _on_lookup_ready(self, icon, path, _iter):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]