[gnome-music] Remove Load More from Songs view



commit 960e4e5943111ab2e009544407b91f8bc702f1f6
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Wed Aug 28 10:35:55 2013 +0200

    Remove Load More from Songs view
    
    This unsets 'count' limit for songs, which will load them all.
    This will enable 'shuffle all the library' use case
    
    https://bugzilla.gnome.org/show_bug.cgi?id=706947

 gnomemusic/grilo.py |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/gnomemusic/grilo.py b/gnomemusic/grilo.py
index a26f4bc..13d77f0 100644
--- a/gnomemusic/grilo.py
+++ b/gnomemusic/grilo.py
@@ -90,8 +90,8 @@ class Grilo(GObject.GObject):
     def populate_albums(self, offset, callback, count=50):
         self.populate_items(Query.ALBUMS, offset, callback, count)
 
-    def populate_songs(self, offset, callback, count=50):
-        self.populate_items(Query.SONGS, offset, callback)
+    def populate_songs(self, offset, callback, count=-1):
+        self.populate_items(Query.SONGS, offset, callback, count)
 
     def populate_album_songs(self, album_id, callback):
         self.populate_items(Query.album_songs(album_id), 0, callback)
@@ -99,7 +99,8 @@ class Grilo(GObject.GObject):
     def populate_items(self, query, offset, callback, count=50):
         options = self.options.copy()
         options.set_skip(offset)
-        options.set_count(count)
+        if count != -1:
+            options.set_count(count)
 
         def _callback(source, param, item, count, data, offset):
             callback(source, param, item)


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