[gnome-games/wip/exalm/cache2: 11/23] description: Add 'has-loaded' property and remove changed()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/cache2: 11/23] description: Add 'has-loaded' property and remove changed()
- Date: Sat, 6 Oct 2018 15:56:53 +0000 (UTC)
commit 97dddd15817c36d8f17e8c82f678404581f1b41d
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Tue Oct 2 18:55:32 2018 +0500
description: Add 'has-loaded' property and remove changed()
src/core/description.vala | 2 +-
src/dummy/dummy-description.vala | 2 ++
src/generic/generic-description.vala | 6 ++++++
src/grilo/grilo-description.vala | 4 +++-
4 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/core/description.vala b/src/core/description.vala
index 69058c8a..b4d771de 100644
--- a/src/core/description.vala
+++ b/src/core/description.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public interface Games.Description : Object {
- public signal void changed ();
+ public abstract bool has_loaded { get; protected set; }
public abstract string get_description ();
}
diff --git a/src/dummy/dummy-description.vala b/src/dummy/dummy-description.vala
index 39a7c244..67ccd08d 100644
--- a/src/dummy/dummy-description.vala
+++ b/src/dummy/dummy-description.vala
@@ -1,6 +1,8 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public class Games.DummyDescription : Object, Description {
+ public bool has_loaded { get; protected set; }
+
public string get_description () {
return _("No description available.");
}
diff --git a/src/generic/generic-description.vala b/src/generic/generic-description.vala
index fa08666f..41ba950c 100644
--- a/src/generic/generic-description.vala
+++ b/src/generic/generic-description.vala
@@ -3,6 +3,12 @@
public class Games.GenericDescription : Object, Description {
private string description;
+ public bool has_loaded { get; protected set; }
+
+ construct {
+ has_loaded = true;
+ }
+
public GenericDescription (string description) {
this.description = description;
}
diff --git a/src/grilo/grilo-description.vala b/src/grilo/grilo-description.vala
index d257b3c4..61081500 100644
--- a/src/grilo/grilo-description.vala
+++ b/src/grilo/grilo-description.vala
@@ -5,6 +5,8 @@ public class Games.GriloDescription : Object, Description {
private string description;
private bool resolving;
+ public bool has_loaded { get; protected set; }
+
public GriloDescription (GriloMedia media) {
this.media = media;
media.resolved.connect (on_media_resolved);
@@ -40,6 +42,6 @@ public class Games.GriloDescription : Object, Description {
private void load_media_description (string description_string) {
description = description_string;
- changed ();
+ has_loaded = true;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]