[gnome-music] view: Show first playlist on populate if available
- From: Arnel A. Borja <arnelborja src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music] view: Show first playlist on populate if available
- Date: Wed, 2 Apr 2014 10:37:04 +0000 (UTC)
commit e6b654bcb867b737ab97efbcee1b28ba93e6ea55
Author: Arnel A. Borja <arnelborja src gnome org>
Date: Wed Apr 2 17:54:07 2014 +0800
view: Show first playlist on populate if available
gnomemusic/view.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gnomemusic/view.py b/gnomemusic/view.py
index 9466473..ec9b132 100644
--- a/gnomemusic/view.py
+++ b/gnomemusic/view.py
@@ -1050,6 +1050,12 @@ class Playlist(ViewContainer):
def populate(self):
for item in sorted(self.playlists_list):
self._add_playlist_item(item)
+ if len(self.playlists_list):
+ _iter = self.playlists_model.get_iter_first()
+ selection = self.playlists_sidebar.get_generic_view().get_selection()
+ selection.select_iter(_iter)
+ self.playlists_sidebar.emit('item-activated', '0',
+ self.playlists_model.get_path(_iter))
def get_selected_track_uris(self, callback):
callback([self.filter.get_value(self.filter.get_iter(path), 5).get_url()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]