[gnome-games/wip/exalm/rebrand: 88/124] plugin: Remove get_uri_game_factories()
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/wip/exalm/rebrand: 88/124] plugin: Remove get_uri_game_factories()
- Date: Sat, 19 Jun 2021 14:37:45 +0000 (UTC)
commit 0a19b20ac9ebd06b5ef21e4e20dd4712989074ac
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Tue Mar 30 15:58:01 2021 +0500
plugin: Remove get_uri_game_factories()
Just assume a GenericUriGameFactory per platform.
plugins/dreamcast/src/dreamcast-plugin.vala | 6 ------
plugins/game-cube/src/game-cube-plugin.vala | 6 ------
plugins/mame/src/mame-plugin.vala | 6 ------
plugins/ms-dos/src/ms-dos-plugin.vala | 6 ------
plugins/nintendo-3ds/src/nintendo-3ds-plugin.vala | 6 ------
plugins/nintendo-64/src/nintendo-64-plugin.vala | 6 ------
plugins/nintendo-ds/src/nintendo-ds-plugin.vala | 6 ------
plugins/playstation/src/playstation-plugin.vala | 6 ------
plugins/sega-cd/src/sega-cd-plugin.vala | 7 -------
plugins/sega-saturn/src/sega-saturn-plugin.vala | 6 ------
plugins/turbografx-cd/src/turbografx-cd-plugin.vala | 6 ------
plugins/virtual-boy/src/virtual-boy-plugin.vala | 6 ------
plugins/wii/src/wii-plugin.vala | 6 ------
src/core/plugin.vala | 4 ----
src/ui/application.vala | 6 +++---
15 files changed, 3 insertions(+), 86 deletions(-)
---
diff --git a/plugins/dreamcast/src/dreamcast-plugin.vala b/plugins/dreamcast/src/dreamcast-plugin.vala
index e811a600..e0a338c3 100644
--- a/plugins/dreamcast/src/dreamcast-plugin.vala
+++ b/plugins/dreamcast/src/dreamcast-plugin.vala
@@ -19,12 +19,6 @@ private class Games.DreamcastPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/game-cube/src/game-cube-plugin.vala b/plugins/game-cube/src/game-cube-plugin.vala
index 633634b1..556cbbf1 100644
--- a/plugins/game-cube/src/game-cube-plugin.vala
+++ b/plugins/game-cube/src/game-cube-plugin.vala
@@ -17,12 +17,6 @@ private class Games.GameCubePlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/mame/src/mame-plugin.vala b/plugins/mame/src/mame-plugin.vala
index 08cd74a4..0066aa19 100644
--- a/plugins/mame/src/mame-plugin.vala
+++ b/plugins/mame/src/mame-plugin.vala
@@ -18,12 +18,6 @@ private class Games.MamePlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/ms-dos/src/ms-dos-plugin.vala b/plugins/ms-dos/src/ms-dos-plugin.vala
index 6305488e..7b2176da 100644
--- a/plugins/ms-dos/src/ms-dos-plugin.vala
+++ b/plugins/ms-dos/src/ms-dos-plugin.vala
@@ -16,12 +16,6 @@ private class Games.MsDosPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/nintendo-3ds/src/nintendo-3ds-plugin.vala
b/plugins/nintendo-3ds/src/nintendo-3ds-plugin.vala
index df1df36b..c4d6f66d 100644
--- a/plugins/nintendo-3ds/src/nintendo-3ds-plugin.vala
+++ b/plugins/nintendo-3ds/src/nintendo-3ds-plugin.vala
@@ -18,12 +18,6 @@ private class Games.Nintendo3DsPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/nintendo-64/src/nintendo-64-plugin.vala b/plugins/nintendo-64/src/nintendo-64-plugin.vala
index 15ec72fa..afcb1003 100644
--- a/plugins/nintendo-64/src/nintendo-64-plugin.vala
+++ b/plugins/nintendo-64/src/nintendo-64-plugin.vala
@@ -17,12 +17,6 @@ private class Games.Nintendo64Plugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
index f3acadbc..81466731 100644
--- a/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
+++ b/plugins/nintendo-ds/src/nintendo-ds-plugin.vala
@@ -18,12 +18,6 @@ private class Games.NintendoDsPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/playstation/src/playstation-plugin.vala b/plugins/playstation/src/playstation-plugin.vala
index 738069e7..030f303a 100644
--- a/plugins/playstation/src/playstation-plugin.vala
+++ b/plugins/playstation/src/playstation-plugin.vala
@@ -18,12 +18,6 @@ private class Games.PlayStation : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/sega-cd/src/sega-cd-plugin.vala b/plugins/sega-cd/src/sega-cd-plugin.vala
index 19d04996..46a6983a 100644
--- a/plugins/sega-cd/src/sega-cd-plugin.vala
+++ b/plugins/sega-cd/src/sega-cd-plugin.vala
@@ -30,13 +30,6 @@ private class Games.SegaCDPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform_sega_cd, platform_sega_cd_32x };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var sega_cd_factory = new GenericUriGameFactory (platform_sega_cd);
- var sega_cd_32x_factory = new GenericUriGameFactory (platform_sega_cd_32x);
-
- return { sega_cd_factory, sega_cd_32x_factory };
- }
}
[ModuleInit]
diff --git a/plugins/sega-saturn/src/sega-saturn-plugin.vala b/plugins/sega-saturn/src/sega-saturn-plugin.vala
index ebe69e2e..3b4458e6 100644
--- a/plugins/sega-saturn/src/sega-saturn-plugin.vala
+++ b/plugins/sega-saturn/src/sega-saturn-plugin.vala
@@ -18,12 +18,6 @@ private class Games.SegaSaturnPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
b/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
index a01f1572..c6a63261 100644
--- a/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
+++ b/plugins/turbografx-cd/src/turbografx-cd-plugin.vala
@@ -19,12 +19,6 @@ private class Games.TurboGrafxCDPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/virtual-boy/src/virtual-boy-plugin.vala b/plugins/virtual-boy/src/virtual-boy-plugin.vala
index 1da8f4e0..f17bad79 100644
--- a/plugins/virtual-boy/src/virtual-boy-plugin.vala
+++ b/plugins/virtual-boy/src/virtual-boy-plugin.vala
@@ -16,12 +16,6 @@ private class Games.VirtualBoyPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/plugins/wii/src/wii-plugin.vala b/plugins/wii/src/wii-plugin.vala
index 7020882b..56024cf0 100644
--- a/plugins/wii/src/wii-plugin.vala
+++ b/plugins/wii/src/wii-plugin.vala
@@ -16,12 +16,6 @@ private class Games.WiiPlugin : Object, Plugin {
public Platform[] get_platforms () {
return { platform };
}
-
- public UriGameFactory[] get_uri_game_factories () {
- var factory = new GenericUriGameFactory (platform);
-
- return { factory };
- }
}
[ModuleInit]
diff --git a/src/core/plugin.vala b/src/core/plugin.vala
index 803cf633..d95f3f36 100644
--- a/src/core/plugin.vala
+++ b/src/core/plugin.vala
@@ -4,8 +4,4 @@ public interface Games.Plugin : Object {
public virtual Platform[] get_platforms () {
return {};
}
-
- public virtual UriGameFactory[] get_uri_game_factories () {
- return {};
- }
}
diff --git a/src/ui/application.vala b/src/ui/application.vala
index 6b50999f..b1add675 100644
--- a/src/ui/application.vala
+++ b/src/ui/application.vala
@@ -476,6 +476,9 @@ public class Games.Application : Gtk.Application {
foreach (var platform in plugin.get_platforms ()) {
platform_register.add_platform (platform);
+ var factory = new GenericUriGameFactory (platform);
+ game_collection.add_factory (factory);
+
if (platform.autodiscovery && tracker_uri_source != null) {
foreach (var mime_type in platform.get_mime_types ()) {
if (mime_types.contains (mime_type))
@@ -487,9 +490,6 @@ public class Games.Application : Gtk.Application {
}
}
}
-
- foreach (var factory in plugin.get_uri_game_factories ())
- game_collection.add_factory (factory);
}
catch (Error e) {
debug ("Error: %s", e.message);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]