[gnome-music/wip/mschraal/core: 182/208] searchview: Add select all/none for artist
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/core: 182/208] searchview: Add select all/none for artist
- Date: Thu, 4 Jul 2019 15:48:53 +0000 (UTC)
commit 4fcd8233c981707547378af71f7e78ab70c27b64
Author: Marinus Schraal <mschraal gnome org>
Date: Mon Jul 1 14:29:16 2019 +0200
searchview: Add select all/none for artist
gnomemusic/views/searchview.py | 10 ++++++++++
1 file changed, 10 insertions(+)
---
diff --git a/gnomemusic/views/searchview.py b/gnomemusic/views/searchview.py
index cf23693d..7cb3f62b 100644
--- a/gnomemusic/views/searchview.py
+++ b/gnomemusic/views/searchview.py
@@ -179,6 +179,11 @@ class SearchView(BaseView):
song_widget.props.show_song_number = False
song_widget.coreartist = coresong
+ coresong.bind_property(
+ "selected", song_widget, "selected",
+ GObject.BindingFlags.BIDIRECTIONAL
+ | GObject.BindingFlags.SYNC_CREATE)
+
self.bind_property(
"selection-mode", song_widget, "selection-mode",
GObject.BindingFlags.BIDIRECTIONAL
@@ -260,8 +265,13 @@ class SearchView(BaseView):
def album_select(child):
child.props.selected = value
+ def artist_select(child):
+ artist_widget = child.get_child()
+ artist_widget.props.selected = value
+
self._songs_listbox.foreach(song_select)
self._album_flowbox.foreach(album_select)
+ self._artist_listbox.foreach(artist_select)
def select_all(self):
self._select_all(True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]