[gnome-games/wip/exalm/cache2: 10/20] publisher: 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: 10/20] publisher: Add 'has-loaded' property and remove changed()
- Date: Sat, 6 Oct 2018 17:26:13 +0000 (UTC)
commit 2f6f3ce8d3c64dc8f6c4d5b9ffcbcc55853ff0f0
Author: Alexander Mikhaylenko <exalm7659 gmail com>
Date: Tue Oct 2 18:56:22 2018 +0500
publisher: Add 'has-loaded' property and remove changed()
src/core/publisher.vala | 2 +-
src/dummy/dummy-publisher.vala | 2 ++
src/generic/generic-publisher.vala | 6 ++++++
src/grilo/grilo-publisher.vala | 4 +++-
4 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/src/core/publisher.vala b/src/core/publisher.vala
index f50ea2c9..753542d2 100644
--- a/src/core/publisher.vala
+++ b/src/core/publisher.vala
@@ -1,7 +1,7 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public interface Games.Publisher : Object {
- public signal void changed ();
+ public abstract bool has_loaded { get; protected set; }
public abstract string get_publisher ();
}
diff --git a/src/dummy/dummy-publisher.vala b/src/dummy/dummy-publisher.vala
index 95fdb71f..09757126 100644
--- a/src/dummy/dummy-publisher.vala
+++ b/src/dummy/dummy-publisher.vala
@@ -1,6 +1,8 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public class Games.DummyPublisher : Object, Publisher {
+ public bool has_loaded { get; protected set; }
+
public string get_publisher () {
return _("Publisher not available.");
}
diff --git a/src/generic/generic-publisher.vala b/src/generic/generic-publisher.vala
index bbebea9c..0945d33c 100644
--- a/src/generic/generic-publisher.vala
+++ b/src/generic/generic-publisher.vala
@@ -3,6 +3,12 @@
public class Games.GenericPublisher : Object, Publisher {
private string publisher;
+ public bool has_loaded { get; protected set; }
+
+ construct {
+ has_loaded = true;
+ }
+
public GenericPublisher (string publisher) {
this.publisher = publisher;
}
diff --git a/src/grilo/grilo-publisher.vala b/src/grilo/grilo-publisher.vala
index d2ce09bf..b0c8d175 100644
--- a/src/grilo/grilo-publisher.vala
+++ b/src/grilo/grilo-publisher.vala
@@ -5,6 +5,8 @@ public class Games.GriloPublisher : Object, Publisher {
private string publisher;
private bool resolving;
+ public bool has_loaded { get; protected set; }
+
public GriloPublisher (GriloMedia media) {
this.media = media;
media.resolved.connect (on_media_resolved);
@@ -43,6 +45,6 @@ public class Games.GriloPublisher : Object, Publisher {
private void load_media_publisher (string publisher_string) {
publisher = publisher_string;
- changed ();
+ has_loaded = true;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]