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



commit c547b278b1475a7a952431239749f5dc70bb2f7b
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]