[gnome-music/wip/mschraal/core: 45/118] disclistboxwidget: Connect selected & favorite



commit 9ff741b053190ba00cbfce7399762f3ab2a3ba13
Author: Marinus Schraal <mschraal gnome org>
Date:   Fri May 31 18:11:51 2019 +0200

    disclistboxwidget: Connect selected & favorite

 gnomemusic/widgets/disclistboxwidget.py | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/gnomemusic/widgets/disclistboxwidget.py b/gnomemusic/widgets/disclistboxwidget.py
index 6c88ac13..bc40c68d 100644
--- a/gnomemusic/widgets/disclistboxwidget.py
+++ b/gnomemusic/widgets/disclistboxwidget.py
@@ -203,6 +203,15 @@ class DiscBox(Gtk.Box):
         song_widget = SongWidget(song.props.media)
         self._songs.append(song_widget)
 
+        song.bind_property(
+            "favorite", song_widget, "favorite",
+            GObject.BindingFlags.BIDIRECTIONAL
+            | GObject.BindingFlags.SYNC_CREATE)
+        song.bind_property(
+            "selected", song_widget, "selected",
+            GObject.BindingFlags.BIDIRECTIONAL
+            | GObject.BindingFlags.SYNC_CREATE)
+
         return song_widget
 
     @log


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