[gnome-music/freeze-break] Add songs to playlist from albums view



commit 26484e554318d2d732d738a2242d60a21ef5e54c
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date:   Thu Sep 12 11:28:28 2013 +0200

    Add songs to playlist from albums view

 gnomemusic/view.py |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 6043fcc..375811a 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -159,7 +159,7 @@ class ViewContainer(Stack):
             self.view.set_selection_mode(True)
             self.header_bar.set_selection_mode(True)
             self.selection_toolbar.eventbox.set_visible(True)
-            self.selection_toolbar._add_to_playlist_button.sensitive = False
+            self.selection_toolbar._add_to_playlist_button.set_sensitive(False)
         else:
             self.view.set_selection_mode(False)
             self.header_bar.set_selection_mode(False)
@@ -337,6 +337,12 @@ class Albums(ViewContainer):
         if grilo.tracker:
             GLib.idle_add(grilo.populate_albums, self._offset, self._add_item)
 
+    def get_selected_track_uris(self):
+        uris = []
+        for path in self._albumWidget.view.get_selection():
+            _iter = self._albumWidget.model.get_iter(path)
+            uris.append(self._albumWidget.model.get_value(_iter, 5).get_url())
+        return uris
 
 class Songs(ViewContainer):
     def __init__(self, header_bar, selection_toolbar, player):


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