[gnome-music] Add All Artist selection to the Artists view (stil needs populating)



commit f9a174f9e4c007255499a843a70d9157d64f2745
Author: Eslam Mostafa <cseslam gmail com>
Date:   Sun May 19 22:24:50 2013 +0200

    Add All Artist selection to the Artists view (stil needs populating)
    
    Signed-off-by: Seif Lotfy <seif lotfy com>

 src/view.js |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/src/view.js b/src/view.js
index bef3765..ff76115 100644
--- a/src/view.js
+++ b/src/view.js
@@ -548,8 +548,17 @@ const Artists = new Lang.Class({
             this.view.get_generic_view().get_style_context().add_class("artist-panel-dark");
         else
             this.view.get_generic_view().get_style_context().add_class("artist-panel-white");
+        this._allIter = this._model.append();
+        this._artists["All Artists".toLowerCase()] = {"iter": this._allIter, "albums": []};
+        this._model.set(
+            this._allIter,
+            [0, 1, 2, 3],
+            ["All Artists", "All Artists", "All Artists", "All Artists"]
+        );
+        let selection = this.view.get_generic_view().get_selection();
+        selection.select_path(this._model.get_path(this._allIter));
+        this.view.emit('item-activated', "0", this._model.get_path(this._allIter));
         this.show_all();
-
     },
 
     _addListRenderers: function() {


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