Exemple #1
0
 def _add_albums(self, albums):
     if albums and not self._stop:
         widget = AlbumSimpleWidget(albums.pop(0))
         widget.show()
         self._albumbox.insert(widget, -1)
         GLib.idle_add(self._add_albums, albums)
     else:
         self._stop = False
Exemple #2
0
 def _add_albums(self, albums):
     if albums and not self._stop:
         widget = AlbumSimpleWidget(albums.pop(0))
         widget.show()
         self._albumbox.insert(widget, -1)
         GLib.idle_add(self._add_albums, albums)
     else:
         self._stop = False
Exemple #3
0
 def _add_albums(self, albums):
     """
         Pop an album and add it to the view,
         repeat operation until album list is empty
         @param [album ids as int]
     """
     if albums and not self._stop:
         widget = AlbumSimpleWidget(albums.pop(0))
         widget.show()
         self._albumbox.insert(widget, -1)
         GLib.idle_add(self._add_albums, albums)
     else:
         self._stop = False
Exemple #4
0
 def _add_albums(self, albums):
     """
         Add albums to the view
         Start lazy loading
         @param [album ids as int]
     """
     if albums and not self._stop:
         widget = AlbumSimpleWidget(albums.pop(0), self._genre_ids,
                                    self._artist_ids)
         self._albumbox.insert(widget, -1)
         widget.show()
         self._lazy_queue.append(widget)
         GLib.idle_add(self._add_albums, albums)
     else:
         self._stop = False
         GLib.idle_add(self.lazy_loading)
         if self._viewport.get_child() is None:
             self._viewport.add(self._albumbox)
Exemple #5
0
 def _add_albums(self, albums):
     """
         Add albums to the view
         Start lazy loading
         @param [album ids as int]
     """
     if albums and not self._stop:
         widget = AlbumSimpleWidget(albums.pop(0),
                                    self._genre_ids,
                                    self._artist_ids)
         self._albumbox.insert(widget, -1)
         widget.show()
         self._lazy_queue.append(widget)
         GLib.idle_add(self._add_albums, albums)
     else:
         self._stop = False
         GLib.idle_add(self.lazy_loading)
         if self._viewport.get_child() is None:
             self._viewport.add(self._albumbox)
Exemple #6
0
 def __add_albums(self, albums):
     """
         Add albums to the view
         Start lazy loading
         @param [album ids as int]
     """
     if self._stop:
         self._stop = False
         return
     if albums:
         widget = AlbumSimpleWidget(albums.pop(0), self.__genre_ids,
                                    self.__artist_ids)
         widget.connect('overlayed', self._on_overlayed)
         self._box.insert(widget, -1)
         widget.show()
         self._lazy_queue.append(widget)
         GLib.idle_add(self.__add_albums, albums)
     else:
         GLib.idle_add(self.lazy_loading)
         if self._viewport.get_child() is None:
             self._viewport.add(self._box)
 def __add_albums(self, albums):
     """
         Add albums to the view
         Start lazy loading
         @param [album ids as int]
     """
     if self._stop:
         self._stop = False
         return
     if albums:
         widget = AlbumSimpleWidget(albums.pop(0),
                                    self.__genre_ids,
                                    self.__artist_ids)
         widget.connect('overlayed', self._on_overlayed)
         self._box.insert(widget, -1)
         widget.show()
         self._lazy_queue.append(widget)
         GLib.idle_add(self.__add_albums, albums)
     else:
         GLib.idle_add(self.lazy_loading)
         if self._viewport.get_child() is None:
             self._viewport.add(self._box)