[gnome-games] utils: Add Icon param to GenericGame constructor
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] utils: Add Icon param to GenericGame constructor
- Date: Wed, 11 May 2016 23:01:49 +0000 (UTC)
commit 204e64ad29515d26719efa6dbd532f1c28a424d5
Author: Adrien Plazas <kekun plazas laposte net>
Date: Wed May 11 17:48:14 2016 +0200
utils: Add Icon param to GenericGame constructor
Add an Icon parameter to the contructor of GenericGame and make all
the users of GenericGame provide one.
This will be used in next commit to replace Game's 'icon' prop by the
get_icon() method.
plugins/amiga/src/amiga-plugin.vala | 3 ++-
plugins/atari-2600/src/atari-2600-plugin.vala | 3 ++-
plugins/atari-7800/src/atari-7800-plugin.vala | 3 ++-
plugins/doom/src/doom-plugin.vala | 3 ++-
plugins/dreamcast/src/dreamcast-plugin.vala | 3 ++-
.../src/game-boy-advance-plugin.vala | 3 ++-
plugins/game-boy/src/game-boy-plugin.vala | 3 ++-
plugins/game-cube/src/game-cube-plugin.vala | 3 ++-
.../master-system/src/master-system-plugin.vala | 3 ++-
plugins/mega-drive/src/mega-drive-plugin.vala | 3 ++-
.../neo-geo-pocket/src/neo-geo-pocket-plugin.vala | 3 ++-
plugins/nes/src/nes-plugin.vala | 3 ++-
plugins/nintendo-64/src/nintendo-64-plugin.vala | 3 ++-
plugins/nintendo-ds/src/nintendo-ds-plugin.vala | 3 ++-
plugins/pc-engine/src/pc-engine-plugin.vala | 3 ++-
plugins/snes/src/snes-plugin.vala | 3 ++-
plugins/wii-ware/src/wii-ware-plugin.vala | 3 ++-
plugins/wii/src/wii-plugin.vala | 3 ++-
src/utils/generic-game.vala | 4 +++-
19 files changed, 39 insertions(+), 19 deletions(-)
---
diff --git a/plugins/amiga/src/amiga-plugin.vala b/plugins/amiga/src/amiga-plugin.vala
index a27b097..2294975 100644
--- a/plugins/amiga/src/amiga-plugin.vala
+++ b/plugins/amiga/src/amiga-plugin.vala
@@ -18,10 +18,11 @@ private class Games.AmigaPlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/atari-2600/src/atari-2600-plugin.vala b/plugins/atari-2600/src/atari-2600-plugin.vala
index 683acfc..d1916d6 100644
--- a/plugins/atari-2600/src/atari-2600-plugin.vala
+++ b/plugins/atari-2600/src/atari-2600-plugin.vala
@@ -18,10 +18,11 @@ private class Games.Atari2600 : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/atari-7800/src/atari-7800-plugin.vala b/plugins/atari-7800/src/atari-7800-plugin.vala
index 5546b1a..8a04aab 100644
--- a/plugins/atari-7800/src/atari-7800-plugin.vala
+++ b/plugins/atari-7800/src/atari-7800-plugin.vala
@@ -18,10 +18,11 @@ private class Games.Atari7800 : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/doom/src/doom-plugin.vala b/plugins/doom/src/doom-plugin.vala
index ac8b74c..15811c5 100644
--- a/plugins/doom/src/doom-plugin.vala
+++ b/plugins/doom/src/doom-plugin.vala
@@ -18,10 +18,11 @@ private class Games.DoomPlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/dreamcast/src/dreamcast-plugin.vala b/plugins/dreamcast/src/dreamcast-plugin.vala
index 7745329..aac297f 100644
--- a/plugins/dreamcast/src/dreamcast-plugin.vala
+++ b/plugins/dreamcast/src/dreamcast-plugin.vala
@@ -21,10 +21,11 @@ private class Games.DreamcastPlugin : Object, Plugin {
var uid = new DreamcastUid (header);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
b/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
index 28d4bf3..b40e6fe 100644
--- a/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
+++ b/plugins/game-boy-advance/src/game-boy-advance-plugin.vala
@@ -18,10 +18,11 @@ private class Games.GameBoyAdvancePlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/game-boy/src/game-boy-plugin.vala b/plugins/game-boy/src/game-boy-plugin.vala
index 78ef0d5..d2c92e0 100644
--- a/plugins/game-boy/src/game-boy-plugin.vala
+++ b/plugins/game-boy/src/game-boy-plugin.vala
@@ -22,10 +22,11 @@ private class Games.GameBoyPlugin : Object, Plugin {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/game-cube/src/game-cube-plugin.vala b/plugins/game-cube/src/game-cube-plugin.vala
index 2e32bb8..4635a13 100644
--- a/plugins/game-cube/src/game-cube-plugin.vala
+++ b/plugins/game-cube/src/game-cube-plugin.vala
@@ -21,10 +21,11 @@ private class Games.GameCubePlugin : Object, Plugin {
var uid = new GameCubeUid (header);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/master-system/src/master-system-plugin.vala
b/plugins/master-system/src/master-system-plugin.vala
index 5aef3aa..e975c65 100644
--- a/plugins/master-system/src/master-system-plugin.vala
+++ b/plugins/master-system/src/master-system-plugin.vala
@@ -22,10 +22,11 @@ private class Games.MasterSystemPlugin : Object, Plugin {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/mega-drive/src/mega-drive-plugin.vala b/plugins/mega-drive/src/mega-drive-plugin.vala
index 775d968..13c8935 100644
--- a/plugins/mega-drive/src/mega-drive-plugin.vala
+++ b/plugins/mega-drive/src/mega-drive-plugin.vala
@@ -22,10 +22,11 @@ private class Games.MegaDrivePlugin : Object, Plugin {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
b/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
index d92141a..b915942 100644
--- a/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
+++ b/plugins/neo-geo-pocket/src/neo-geo-pocket-plugin.vala
@@ -18,10 +18,11 @@ private class Games.NeoGeoPocketPlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/nes/src/nes-plugin.vala b/plugins/nes/src/nes-plugin.vala
index 3a76025..0e05eb7 100644
--- a/plugins/nes/src/nes-plugin.vala
+++ b/plugins/nes/src/nes-plugin.vala
@@ -18,10 +18,11 @@ private class Games.NesPlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/nintendo-64/src/nintendo-64-plugin.vala b/plugins/nintendo-64/src/nintendo-64-plugin.vala
index 8151179..1c25f39 100644
--- a/plugins/nintendo-64/src/nintendo-64-plugin.vala
+++ b/plugins/nintendo-64/src/nintendo-64-plugin.vala
@@ -18,10 +18,11 @@ private class Games.Nintendo64Plugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
index cf45391..2ec1e02 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
@@ -18,10 +18,11 @@ private class Games.NintendoDsPlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new NintendoDsIcon (uri);
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/pc-engine/src/pc-engine-plugin.vala b/plugins/pc-engine/src/pc-engine-plugin.vala
index 59a74cf..0b58af8 100644
--- a/plugins/pc-engine/src/pc-engine-plugin.vala
+++ b/plugins/pc-engine/src/pc-engine-plugin.vala
@@ -18,10 +18,11 @@ private class Games.PcEnginePlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/snes/src/snes-plugin.vala b/plugins/snes/src/snes-plugin.vala
index 6038a43..e9924d9 100644
--- a/plugins/snes/src/snes-plugin.vala
+++ b/plugins/snes/src/snes-plugin.vala
@@ -18,10 +18,11 @@ private class Games.SnesPlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/wii-ware/src/wii-ware-plugin.vala b/plugins/wii-ware/src/wii-ware-plugin.vala
index 11bb521..4c871d2 100644
--- a/plugins/wii-ware/src/wii-ware-plugin.vala
+++ b/plugins/wii-ware/src/wii-ware-plugin.vala
@@ -18,10 +18,11 @@ private class Games.WiiWarePlugin : Object, Plugin {
private static Game game_for_uri (string uri) throws Error {
var uid = new FingerprintUid (uri, FINGERPRINT_PREFIX);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index 89dbc51..23dad2b 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -21,10 +21,11 @@ private class Games.WiiPlugin : Object, Plugin {
var uid = new WiiUid (header);
var title = new FilenameTitle (uri);
+ var icon = new DummyIcon ();
var cover = new DummyCover ();
var runner = new RetroRunner (MODULE_BASENAME, uri, uid, SUPPORTS_SNAPSHOTTING);
- return new GenericGame (title, cover, runner);
+ return new GenericGame (title, icon, cover, runner);
}
}
diff --git a/src/utils/generic-game.vala b/src/utils/generic-game.vala
index 94f449e..82a79da 100644
--- a/src/utils/generic-game.vala
+++ b/src/utils/generic-game.vala
@@ -28,11 +28,13 @@ public class Games.GenericGame : Object, Game {
}
private Title game_title;
+ private Icon game_icon;
private Cover game_cover;
private Runner game_runner;
- public GenericGame (Title title, Cover cover, Runner runner) {
+ public GenericGame (Title title, Icon icon, Cover cover, Runner runner) {
game_title = title;
+ game_icon = icon;
game_cover = cover;
game_runner = runner;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]