[gnome-music] More cleanup
- From: Seif Lotfy <seiflotfy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] More cleanup
- Date: Mon, 22 Apr 2013 21:16:24 +0000 (UTC)
commit 2656c658240ffb38a2b3eaaa37e54efc32722d3f
Author: Seif Lotfy <seif lotfy com>
Date: Mon Apr 22 23:16:10 2013 +0200
More cleanup
src/widgets.js | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
---
diff --git a/src/widgets.js b/src/widgets.js
index 5e2ec87..aa20565 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -122,8 +122,8 @@ const AlbumWidget = new Lang.Class({
function(col, cell, model, iter) {
let item = model.get_value(iter, 5);
let duration = item.get_duration ();
- if (!item)
- return;
+ if (!item)
+ return;
durationRenderer.text = this.player.seconds_to_string(duration);
}));
},
@@ -163,8 +163,8 @@ const AlbumWidget = new Lang.Class({
}
this.ui.get_object("cover").set_from_pixbuf (pixbuf);
- this.ui.get_object("artist_label").set_text(artist);
- this.ui.get_object("title_label").set_text(album);
+ this.ui.get_object("artist_label").set_markup(artist);
+ this.ui.get_object("title_label").set_markup(album);
this.ui.get_object("released_label_info").set_text(item.get_creation_date().get_year().toString());
this.player.connect('song-changed', Lang.bind(this,
@@ -294,16 +294,12 @@ const ArtistAlbumWidget = new Lang.Class({
ui.get_object("title").set_text(track.get_title());
//var songWidget = ui.get_object("duration").set_text(track.get_title());
ui.get_object("title").set_alignment(0.0, 0.5);
- if (this.songs.length == 1) {
- this.ui.get_object("grid1").add(songWidget);
- }
- else {
- var i = this.songs.length - 1;
- this.ui.get_object("grid1").attach(songWidget, parseInt(i/(tracks.length/2)),
parseInt((i)%(tracks.length/2)), 1, 1)
- }
- this.ui.get_object("grid1").show_all();
+ this.ui.get_object("grid1").attach(songWidget,
+ parseInt(i/(tracks.length/2)),
+ parseInt((i)%(tracks.length/2)), 1, 1);
}
}
+ this.ui.get_object("grid1").show_all();
}
}));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]