[gnome-music/playlists] view songs list in songs view
- From: Eslam Mostafa <cseslam src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/playlists] view songs list in songs view
- Date: Wed, 3 Jul 2013 02:18:21 +0000 (UTC)
commit afc7886836d027d6f78618b03d70f52f5eb543e8
Author: Eslam Mostafa <me eslammostafa com>
Date: Wed Jul 3 04:18:06 2013 +0200
view songs list in songs view
src/view.js | 5 ++---
src/widgets.js | 7 +++++++
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/view.js b/src/view.js
index f058c1a..b2a2dce 100644
--- a/src/view.js
+++ b/src/view.js
@@ -319,11 +319,10 @@ const Songs = new Lang.Class({
this.countQuery = Query.songs_count;
this._items = {};
this.isStarred = null;
+ this._grid.remove(this.view);
this.view = new Widgets.SongsList(player, this._model);
- this._iconHeight = 32;
- this._iconWidth = 32;
- this._symbolicIcon = albumArtCache.makeDefaultIcon(this._iconHeight, this._iconWidth)
this.player = player;
+ this._grid.add(this.view);
},
populate: function() {
diff --git a/src/widgets.js b/src/widgets.js
index 422f39d..79692cb 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -38,6 +38,7 @@ const albumArtCache = AlbumArtCache.AlbumArtCache.getDefault();
const nowPlayingIconName = 'media-playback-start-symbolic';
const errorIconName = 'dialog-error-symbolic';
+const starIconName = 'starred-symbolic';
const LoadMoreButton = new Lang.Class({
Name: 'LoadMoreButton',
@@ -643,6 +644,9 @@ const SongsList = new Lang.Class({
this.player = player;
this.set_view_type(Gd.MainViewType.LIST);
this.get_generic_view().get_style_context().add_class("songs-list")
+ this.countQuery = Query.songs_count;
+ this._items = {};
+ this.isStarred = null;
this.model = model;
if (this.model == null) {
this.model = Gtk.ListStore.new([
@@ -659,6 +663,9 @@ const SongsList = new Lang.Class({
]);
}
this.set_model(this.model);
+ this._iconHeight = 32;
+ this._iconWidth = 32;
+ this._symbolicIcon = albumArtCache.makeDefaultIcon(this._iconHeight, this._iconWidth)
this._addListRenderers();
this.show_all();
this.connect('item-activated', Lang.bind(this, this._onItemActivated));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]