[gnome-music] fix some minor paddings and set album image properly in player



commit a776fbd149f82628c84faba1d6b3cf8ea4a60b45
Author: Seif Lotfy <seif lotfy com>
Date:   Sat Apr 27 22:00:08 2013 +0200

    fix some minor paddings and set album image properly in player

 src/player.js  |    8 +++++---
 src/widgets.js |    7 +++++--
 2 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/src/player.js b/src/player.js
index 604ba99..4f2a7db 100644
--- a/src/player.js
+++ b/src/player.js
@@ -25,6 +25,7 @@ const Gd = imports.gi.Gd;
 const Gst = imports.gi.Gst;
 const GLib = imports.gi.GLib;
 const GObject = imports.gi.GObject;
+const Grl = imports.gi.Grl;
 const Signals = imports.signals;
 
 //pkg.initSubmodule('libgd');
@@ -32,7 +33,7 @@ const Signals = imports.signals;
 const Mainloop = imports.mainloop;
 const AlbumArtCache = imports.albumArtCache;
 
-const ART_SIZE = 64;
+const ART_SIZE = 36;
 
 const RepeatType = {
     NONE: 0,
@@ -135,7 +136,8 @@ const Player = new Lang.Class({
         this.next_btn.set_sensitive(true);
 
         // FIXME: site contains the album's name. It's obviously a hack to remove
-        pixbuf = this.cache.lookup (ART_SIZE, media.get_artist (), media.get_site ());
+        
+        pixbuf = this.cache.lookup (ART_SIZE, media.get_artist (), media.get_string(Grl.METADATA_KEY_ALBUM));
         this.cover_img.set_from_pixbuf (pixbuf);
 
         if (media.get_title() != null) {
@@ -345,7 +347,7 @@ const Player = new Lang.Class({
             spacing: 0
         });
 
-        this.toolbar_song_info.pack_start(databox, false, false, 0);
+        this.toolbar_song_info.pack_start(databox, false, false, 12);
 
         toolbar_center.pack_start(this.toolbar_song_info, false, false, 3);
         toolbar_center.pack_start(this.progress_scale, true, true, 0);
diff --git a/src/widgets.js b/src/widgets.js
index fe68a63..5f97307 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -42,6 +42,7 @@ const folderPixbuf_big = GdkPixbuf.Pixbuf.new_from_file_at_scale(
 const nowPlayingPixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(
         "/usr/share/icons/gnome/scalable/actions/media-playback-start-symbolic.svg",
         -1, 16, true);
+
 const AlbumWidget = new Lang.Class({
     Name: "AlbumWidget",
     Extends: Gtk.EventBox,
@@ -179,8 +180,10 @@ const AlbumWidget = new Lang.Class({
 
         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());
-
+        if (item.get_creation_date())
+            
this.ui.get_object("released_label_info").set_text(item.get_creation_date().get_year().toString());
+        else
+            this.ui.get_object("released_label_info").set_text("----");
         this.player.connect('playlist-item-changed', Lang.bind(this,
             function(player, playlist, iter) { this.updateModel(playlist, iter);}
         ));


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