[gnome-music/wip/jfelder/coredisc-updates: 1/2] corealbum: Add a model_loaded property



commit 3d8bba4b95458b3d6b49ef4e3ba0bb46c0701282
Author: Jean Felder <jfelder src gnome org>
Date:   Fri Feb 21 16:18:45 2020 +0100

    corealbum: Add a model_loaded property

 gnomemusic/corealbum.py | 10 ++++++++++
 1 file changed, 10 insertions(+)
---
diff --git a/gnomemusic/corealbum.py b/gnomemusic/corealbum.py
index 9084cd82..26033810 100644
--- a/gnomemusic/corealbum.py
+++ b/gnomemusic/corealbum.py
@@ -66,6 +66,16 @@ class CoreAlbum(GObject.GObject):
         self.props.url = media.get_url()
         self.props.year = utils.get_media_year(media)
 
+    @GObject.Property(
+        type=bool, default=False, flags=GObject.ParamFlags.READABLE)
+    def model_loaded(self):
+        """Check if the model has already been loaded
+
+        :returns: True if the model is loaded
+        :rtype: bool
+        """
+        return self._model is not None
+
     @GObject.Property(
         type=Gio.ListModel, default=None, flags=GObject.ParamFlags.READABLE)
     def model(self):


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