[gnome-music/wip/jfelder/selection-coresong-playlist: 3/3] grltrackerplaylists: Make state property binding unidirectional
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/selection-coresong-playlist: 3/3] grltrackerplaylists: Make state property binding unidirectional
- Date: Sat, 28 Mar 2020 09:48:12 +0000 (UTC)
commit 85486d6c71d1a466156e90a6b28715a1990cff7b
Author: Jean Felder <jfelder src gnome org>
Date: Sat Mar 28 10:41:14 2020 +0100
grltrackerplaylists: Make state property binding unidirectional
There is no need to be bidirectional. That way, another view will show
the correct song playing.
gnomemusic/grilowrappers/grltrackerplaylists.py | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/grilowrappers/grltrackerplaylists.py b/gnomemusic/grilowrappers/grltrackerplaylists.py
index fe2b43c5..57d38aa0 100644
--- a/gnomemusic/grilowrappers/grltrackerplaylists.py
+++ b/gnomemusic/grilowrappers/grltrackerplaylists.py
@@ -435,17 +435,20 @@ class Playlist(GObject.GObject):
# It is not necessary to bind all the CoreSong properties:
# selected property is linked to a view
# validation is a short-lived playability check for local songs
- properties = [
+ bidirectional_properties = [
"album", "album_disc_number", "artist", "duration", "media",
- "grlid", "play_count", "state", "title", "track_number", "url",
- "favorite"]
+ "grlid", "play_count", "title", "track_number", "url", "favorite"]
- for prop in properties:
+ for prop in bidirectional_properties:
main_coresong.bind_property(
prop, coresong, prop,
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
+ # There is no need for the "state" property to be bidirectional
+ coresong.bind_property(
+ prop, main_coresong, "state", GObject.BindingFlags.DEFAULT)
+
@GObject.Property(type=str, default=None)
def title(self):
"""Playlist title
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]