[gnome-music/wip/mschraal/core: 68/190] coremodel: Make coredisc use properties



commit 4d6d4f0378e00dc5552e64ad6ddb8cf4137c5a6a
Author: Marinus Schraal <mschraal gnome org>
Date:   Wed Jun 19 10:33:59 2019 +0200

    coremodel: Make coredisc use properties

 gnomemusic/coremodel.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/coremodel.py b/gnomemusic/coremodel.py
index a3487988..59eb33f4 100644
--- a/gnomemusic/coremodel.py
+++ b/gnomemusic/coremodel.py
@@ -13,8 +13,9 @@ from gnomemusic.widgets.songwidget import SongWidget
 
 
 class CoreDisc(GObject.GObject):
-        media = None
-        model = None
+
+    media = GObject.Property(type=Grl.Media, default=None)
+    model = GObject.Property(type=Gio.ListModel, default=None)
 
 
 class CoreArtistAlbum(GObject.GObject):
@@ -84,8 +85,8 @@ class CoreModel(GObject.GObject):
                 self._wrap_list_store_sort_func(_disc_sort))
 
             coredisc = CoreDisc()
-            coredisc.media = disc
-            coredisc.model = model_sort
+            coredisc.props.media = disc
+            coredisc.props.model = model_sort
 
             disc_model.append(coredisc)
 


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