[gnome-music/wip/mschraal/coremodel-playlist-fixes: 2/5] coremodel: Bind validation property in reverse
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/coremodel-playlist-fixes: 2/5] coremodel: Bind validation property in reverse
- Date: Wed, 17 Jul 2019 10:18:07 +0000 (UTC)
commit 70d36a9dab9a083eb209653732105e2b53d8976f
Author: Marinus Schraal <mschraal gnome org>
Date: Wed Jul 17 10:43:10 2019 +0200
coremodel: Bind validation property in reverse
This should avoid a signal storm on playlist creation in SongListStore.
gnomemusic/coremodel.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index 23a83401..429e8d2b 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -221,8 +221,8 @@ class CoreModel(GObject.GObject):
song.bind_property(
"state", coresong, "state",
GObject.BindingFlags.SYNC_CREATE)
- song.bind_property(
- "validation", coresong, "validation",
+ coresong.bind_property(
+ "validation", song, "validation",
GObject.BindingFlags.SYNC_CREATE)
with model.freeze_notify():
@@ -248,8 +248,8 @@ class CoreModel(GObject.GObject):
song.bind_property(
"state", model_song, "state",
GObject.BindingFlags.SYNC_CREATE)
- song.bind_property(
- "validation", model_song, "validation",
+ model_song.bind_property(
+ "validation", song, "validation",
GObject.BindingFlags.SYNC_CREATE)
self.emit("playlist-loaded")
@@ -274,8 +274,8 @@ class CoreModel(GObject.GObject):
song.bind_property(
"state", model_song, "state",
GObject.BindingFlags.SYNC_CREATE)
- song.bind_property(
- "validation", model_song, "validation",
+ model_song.bind_property(
+ "validation", song, "validation",
GObject.BindingFlags.SYNC_CREATE)
self.emit("playlist-loaded")
@@ -326,8 +326,8 @@ class CoreModel(GObject.GObject):
song.bind_property(
"state", model_song, "state",
GObject.BindingFlags.SYNC_CREATE)
- song.bind_property(
- "validation", model_song, "validation",
+ model_song.bind_property(
+ "validation", song, "validation",
GObject.BindingFlags.SYNC_CREATE)
# self._search_signal_id = self._song_search_model.connect(
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]