[gnome-music/wip/mschraal/validation-status-fix-round-2: 1/2] coremodel: Pass the validation status back



commit b80e571dd781aa7ff68f86650c4ed41296485073
Author: Marinus Schraal <mschraal gnome org>
Date:   Thu Jul 18 13:19:30 2019 +0200

    coremodel: Pass the validation status back
    
    The validation status should be passed back from the player model to the main
    model for proper display in the widgets.

 gnomemusic/coremodel.py | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index d71092d2..6ca192eb 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -231,7 +231,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     coresong.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
         with model.freeze_notify():
 
@@ -258,7 +259,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     model_song.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
                 self.emit("playlist-loaded")
             elif playlist_type == PlayerPlaylist.Type.ARTIST:
@@ -284,7 +286,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     model_song.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
                 self.emit("playlist-loaded")
             elif playlist_type == PlayerPlaylist.Type.SONGS:
@@ -334,7 +337,8 @@ class CoreModel(GObject.GObject):
                         GObject.BindingFlags.SYNC_CREATE)
                     model_song.bind_property(
                         "validation", song, "validation",
-                        GObject.BindingFlags.SYNC_CREATE)
+                        GObject.BindingFlags.BIDIRECTIONAL
+                        | GObject.BindingFlags.SYNC_CREATE)
 
                 self.emit("playlist-loaded")
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]