[gnome-music/wip/merge: 268/343] Wrap grilo requests in GLib.add



commit 5920a4eb821fd8cb3769ed63bc7d77377e857e29
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Thu Jul 18 13:55:54 2013 +0200

    Wrap grilo requests in GLib.add

 gnomemusic/view.py    |    6 +++---
 gnomemusic/widgets.py |    6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index dfcfa13..a860e85 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -260,7 +260,7 @@ class Albums(ViewContainer):
 
     def populate(self):
         if grilo.tracker is not None:
-            grilo.populate_albums(self._offset, self._add_item)
+            GLib.idle_add(grilo.populate_albums, self._offset, self._add_item)
 
 
 class Songs(ViewContainer):
@@ -398,7 +398,7 @@ class Songs(ViewContainer):
 
     def populate(self):
         if grilo.tracker is not None:
-            grilo.populate_songs(self._offset, self._add_item)
+            GLib.idle_add(grilo.populate_songs, self._offset, self._add_item)
 
 
 class Playlist(ViewContainer):
@@ -491,4 +491,4 @@ class Artists (ViewContainer):
 
     def populate(self):
         if grilo.tracker is not None:
-            grilo.populate_artists(self._offset, self._add_item)
+            GLib.idle_add(grilo.populate_artists, self._offset, self._add_item)
diff --git a/gnomemusic/widgets.py b/gnomemusic/widgets.py
index 62f28ed..759a36a 100644
--- a/gnomemusic/widgets.py
+++ b/gnomemusic/widgets.py
@@ -199,7 +199,7 @@ class AlbumWidget(Gtk.EventBox):
                                        GObject.TYPE_BOOLEAN,
                                        GObject.TYPE_BOOLEAN,
                                        )
-            grilo.get_album_songs(item.get_id(), self._on_get_album_songs)
+            GLib.idle_add(grilo.get_album_songs, item.get_id(), self._on_get_album_songs)
         header_bar._selectButton.connect('toggled',
                                          self._on_header_select_button_toggled)
         header_bar._cancelButton.connect('clicked',
@@ -443,7 +443,7 @@ class AllArtistsAlbums(ArtistAlbums):
 
     def _populate(self, data=None):
         if grilo.tracker:
-            grilo.populate_albums(self._offset, self.add_item, 5)
+            GLib.idle_add(grilo.populate_albums, self._offset, self.add_item, 5)
 
     def add_item(self, source, param, item):
         if item:
@@ -483,7 +483,7 @@ class ArtistAlbumWidget(Gtk.HBox):
                 "<span color='grey'>(%s)</span>" %
                 str(album.get_creation_date().get_year()))
         self.tracks = []
-        grilo.get_album_songs(album.get_id(), self.get_songs)
+        GLib.idle_add(grilo.get_album_songs, album.get_id(), self.get_songs)
         self.pack_start(self.ui.get_object("ArtistAlbumWidget"), True, True, 0)
         self.show_all()
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]