[gnome-games] generic: Add GenericUriGameSource.game_added()
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] generic: Add GenericUriGameSource.game_added()
- Date: Fri, 5 May 2017 20:18:48 +0000 (UTC)
commit f711e942b40eb3ce33225cf69696fb525063ebb4
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri May 5 20:48:59 2017 +0200
generic: Add GenericUriGameSource.game_added()
This will be used in the next commit to add games to the collection
directly when they are found by a generic URI game source.
https://bugzilla.gnome.org/show_bug.cgi?id=781334
src/generic/generic-uri-game-source.vala | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/generic/generic-uri-game-source.vala b/src/generic/generic-uri-game-source.vala
index ffcc3b1..c877e70 100644
--- a/src/generic/generic-uri-game-source.vala
+++ b/src/generic/generic-uri-game-source.vala
@@ -1,6 +1,8 @@
// This file is part of GNOME Games. License: GPL-3.0+.
public class Games.GenericUriGameSource : Object, GameSource {
+ public signal void game_added (Game game);
+
private UriSource[] sources;
private UriGameFactory[] factories;
@@ -22,6 +24,8 @@ public class Games.GenericUriGameSource : Object, GameSource {
factories_for_mime_type[mime_type] = new Array<UriGameFactory> ();
factories_for_mime_type[mime_type].append_val (factory);
}
+
+ factory.game_added.connect ((game) => game_added (game));
}
public async void add_uri (string uri) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]