[gnome-music/freeze-break: 74/107] view: Play song when activated
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/freeze-break: 74/107] view: Play song when activated
- Date: Wed, 11 Sep 2013 13:20:35 +0000 (UTC)
commit 38f2eac3ef61ae41da2ec937494ece0cf01c1b59
Author: Arnel A. Borja <arnelborja src gnome org>
Date: Thu Sep 5 00:46:32 2013 +0800
view: Play song when activated
gnomemusic/view.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 35435bc..0de549b 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -771,6 +771,12 @@ class Playlist(ViewContainer):
self._playlist_list[item] = {"iter": _iter, "albums": []}
self.playlists_model.set(_iter, [2], [item])
+ def _on_item_activated(self, widget, id, path):
+ _iter = self._model.get_iter(path)
+ if self._model.get_value(_iter, 8) != self.errorIconName:
+ self.player.set_playlist('Playlist', self.current_playlist, self._model, _iter, 5)
+ self.player.set_playing(True)
+
def _on_item_changed(self, monitor, file1, file2, event, _iter):
if self._model.iter_is_valid(_iter):
if event == Gio.FileMonitorEvent.DELETED:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]