[gnome-music] Fix running length when the sum is exact
- From: Juan A. Suarez Romero <jasuarez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Fix running length when the sum is exact
- Date: Thu, 4 Apr 2013 13:58:51 +0000 (UTC)
commit a9389739b5aa0ef7beaa383398a9c392bf2eb6ff
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date: Thu Apr 4 13:24:45 2013 +0000
Fix running length when the sum is exact
When summing the total running length gives an exact number, like 2:00, show "2
min" instead of "3 min".
src/widgets.js | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/widgets.js b/src/widgets.js
index aef4a39..2634d92 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -162,7 +162,7 @@ const AlbumWidget = new Lang.Class({
let clickableLabel = new ClickableLabel (track);
this.tracks_labels[track.get_title()] = clickableLabel;
this.songsList.pack_start(clickableLabel, false, false, 0);
- this.running_length_label_info.set_text((parseInt(duration/60) + 1) + " min");
+ this.running_length_label_info.set_text(Math.ceil(duration/60) + " min");
this.tracks_labels[track.get_title()].button.connect("clicked", Lang.bind(this, function () {
this.player.setCurrentTrack(track);
this.player.play_btn.set_active(true);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]