[gnome-music] view: Show new playlist when current playlist is deleted
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] view: Show new playlist when current playlist is deleted
- Date: Wed, 2 Apr 2014 10:36:59 +0000 (UTC)
commit 89041529dc22a8167f515ca831f42a7a91c818ab
Author: Arnel A. Borja <arnelborja src gnome org>
Date: Wed Apr 2 17:53:29 2014 +0800
view: Show new playlist when current playlist is deleted
https://bugzilla.gnome.org/show_bug.cgi?id=724627
gnomemusic/view.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index aa1409d..9466473 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -1007,6 +1007,14 @@ class Playlist(ViewContainer):
if not _iter:
return
+ iter_next = self.playlists_model.iter_next(_iter)\
+ or self.playlists_model.iter_previous(_iter)
+ if iter_next:
+ selection = self.playlists_sidebar.get_generic_view().get_selection()
+ selection.select_iter(iter_next)
+ self.playlists_sidebar.emit('item-activated', '0',
+ self.playlists_model.get_path(iter_next))
+
playlist = self.playlists_model.get_value(_iter, 2)
playlists.delete_playlist(playlist)
self.playlists_model.remove(_iter)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]