[gnome-games/wip/exalm/cache2: 18/27] release-date: 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: 18/27] release-date: Add 'has-loaded' property and remove changed()
- Date: Sun, 7 Oct 2018 10:24:35 +0000 (UTC)
commit 26f2668d986daf46d47af722eb8c839a7c71a7ff
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Tue Oct 2 18:56:50 2018 +0500
release-date: Add 'has-loaded' property and remove changed()
src/core/release-date.vala | 2 +-
src/dummy/dummy-release-date.vala | 2 ++
src/generic/generic-release-date.vala | 6 ++++++
src/grilo/grilo-release-date.vala | 4 +++-
4 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/core/release-date.vala b/src/core/release-date.vala
index 6461f2e6..ba00f60e 100644
--- a/src/core/release-date.vala
+++ b/src/core/release-date.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public interface Games.ReleaseDate : Object {
- public signal void changed ();
+ public abstract bool has_loaded { get; protected set; }
public abstract DateTime get_release_date ();
}
diff --git a/src/dummy/dummy-release-date.vala b/src/dummy/dummy-release-date.vala
index 895e6842..4b209b8d 100644
--- a/src/dummy/dummy-release-date.vala
+++ b/src/dummy/dummy-release-date.vala
@@ -1,6 +1,8 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public class Games.DummyReleaseDate : Object, ReleaseDate {
+ public bool has_loaded { get; protected set; }
+
public DateTime get_release_date () {
return new DateTime.utc (1970, 1, 1, 0, 0, 0);
}
diff --git a/src/generic/generic-release-date.vala b/src/generic/generic-release-date.vala
index ddf2e89c..81209198 100644
--- a/src/generic/generic-release-date.vala
+++ b/src/generic/generic-release-date.vala
@@ -3,6 +3,12 @@
public class Games.GenericReleaseDate : Object, ReleaseDate {
private DateTime release_date;
+ public bool has_loaded { get; protected set; }
+
+ construct {
+ has_loaded = true;
+ }
+
public GenericReleaseDate (DateTime release_date) {
this.release_date = release_date;
}
diff --git a/src/grilo/grilo-release-date.vala b/src/grilo/grilo-release-date.vala
index 028a4536..4f03074d 100644
--- a/src/grilo/grilo-release-date.vala
+++ b/src/grilo/grilo-release-date.vala
@@ -5,6 +5,8 @@ public class Games.GriloReleaseDate : Object, ReleaseDate {
private DateTime release_date;
private bool resolving;
+ public bool has_loaded { get; protected set; }
+
public GriloReleaseDate (GriloMedia media) {
this.media = media;
media.resolved.connect (on_media_resolved);
@@ -40,6 +42,6 @@ public class Games.GriloReleaseDate : Object, ReleaseDate {
private void load_media_release_date (DateTime release) {
release_date = release;
- changed ();
+ has_loaded = true;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]