Commit 5f982488 authored by Marinus Schraal's avatar Marinus Schraal

coremodel: Bind player model state bidirectional

The player model needs to set state towards the main playlist model to
keep the different CoreSong's in sync.

Make the binding between the coresongs bidirectional.
parent 72c225b8
......@@ -240,9 +240,10 @@ class CoreModel(GObject.GObject):
coresong.props.media, self._coreselection,
self.props.grilo)
song.bind_property(
"state", coresong, "state",
GObject.BindingFlags.SYNC_CREATE)
coresong.bind_property(
"state", song, "state",
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
coresong.bind_property(
"validation", song, "validation",
GObject.BindingFlags.BIDIRECTIONAL
......@@ -284,9 +285,10 @@ class CoreModel(GObject.GObject):
self.props.grilo)
songs_added.append(song)
song.bind_property(
"state", model_song, "state",
GObject.BindingFlags.SYNC_CREATE)
model_song.bind_property(
"state", song, "state",
GObject.BindingFlags.BIDIRECTIONAL
| GObject.BindingFlags.SYNC_CREATE)
model_song.bind_property(
"validation", song, "validation",
GObject.BindingFlags.BIDIRECTIONAL
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment