[gnome-music/wip/jfelder/coredisc-updates: 324/325] corealbum: Add a model_loaded property
- From: Jean Felder <jfelder src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/jfelder/coredisc-updates: 324/325] corealbum: Add a model_loaded property
- Date: Thu, 12 Nov 2020 12:15:04 +0000 (UTC)
commit 8b64e4db587daf19f383750b72eaf40d6469b40d
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 4ab1569cc..72fe2f0e4 100644
--- a/gnomemusic/corealbum.py
+++ b/gnomemusic/corealbum.py
@@ -85,6 +85,16 @@ class CoreAlbum(GObject.GObject):
return disc_model_sort
+ @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]