[gnome-music] Don't try to clean iter if another album was selected
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] Don't try to clean iter if another album was selected
- Date: Wed, 24 Apr 2013 14:10:37 +0000 (UTC)
commit 473b46c0d48ae987510add4bb9ed4a8337d6c97e
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Wed Apr 24 11:24:37 2013 +0200
Don't try to clean iter if another album was selected
src/widgets.js | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/widgets.js b/src/widgets.js
index 36bc8ad..613fba3 100644
--- a/src/widgets.js
+++ b/src/widgets.js
@@ -54,12 +54,12 @@ const AlbumWidget = new Lang.Class({
this.album=null;
this.view.connect('item-activated', Lang.bind(this,
function(widget, id, path) {
- if (this.iterToClean){
- let item = this.model.get_value(this.iterToClean, 5);
- this.model.set_value(this.iterToClean, 0, item.get_title());
- // Hide now playing icon
- this.model.set_value(this.iterToClean, 3, false);
- }
+ if (this.iterToClean && this.player.playlist_id == this.album){
+ let item = this.model.get_value(this.iterToClean, 5);
+ this.model.set_value(this.iterToClean, 0, item.get_title());
+ // Hide now playing icon
+ this.model.set_value(this.iterToClean, 3, false);
+ }
this.player.setPlaylist("Album", this.album, this.model, this.model.get_iter(path)[1], 5);
this.player.play();
})
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]