After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783111 - plugins: Refactor plugins registering one MIME type per platform
plugins: Refactor plugins registering one MIME type per platform
Status: RESOLVED FIXED
Product: gnome-games
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-26 05:15 UTC by Adrien Plazas
Modified: 2017-05-26 05:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
retro: Add RetroSimpleType (1.31 KB, patch)
2017-05-26 05:17 UTC, Adrien Plazas
committed Details | Review
retro: Add RetroSimpleGameUriAdapter (2.04 KB, patch)
2017-05-26 05:17 UTC, Adrien Plazas
committed Details | Review
ui: Register game types from the application (2.45 KB, patch)
2017-05-26 05:17 UTC, Adrien Plazas
committed Details | Review
amiga: Replace the plugin by a simple type (6.10 KB, patch)
2017-05-26 05:17 UTC, Adrien Plazas
committed Details | Review
atari-2600: Replace the plugin by a simple type (6.52 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
atari-7800: Replace the plugin by a simple type (6.58 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
atari-lynx: Replace the plugin by a simple type (6.59 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
doom: Replace the plugin by a simple type (6.11 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
game-boy: Replace the plugin by simple types (10.57 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
game-boy-advance: Replace the plugin by a simple type (7.20 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
master-system: Replace the plugin by simple types (11.83 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
mega-drive: Move cartridge types to simple types (4.59 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
Replace mega-drive plugin by sega-cd plugin (17.89 KB, patch)
2017-05-26 05:18 UTC, Adrien Plazas
committed Details | Review
ms-dos: Replace the plugin by a simple type (6.63 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
neo-geo-pocket: Replace the plugin by a simple type (7.25 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
nes: Replace the plugin by simple types (8.15 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
nintendo-64: Replace the plugin by a simple type (7.07 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
pc-engine: Move cartridge types to simple types (3.18 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
Replace pc-engine plugin by turbografx-cd plugin (9.61 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
snes: Replace the plugin by a simple type (6.49 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
wii-ware: Replace the plugin by a simple type (6.55 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review
wonderswan: Replace the plugin by simple types (7.63 KB, patch)
2017-05-26 05:19 UTC, Adrien Plazas
committed Details | Review

Description Adrien Plazas 2017-05-26 05:15:26 UTC
Many plugins are just copies of each other with a few strings changed: MIME-types, platforms and prefixes declarations.

These could be refactored to be greatly simplified, or even better they could be dropped and these simple types could be handled directly into Games and not as plugins.
Comment 1 Adrien Plazas 2017-05-26 05:17:35 UTC
Created attachment 352603 [details] [review]
retro: Add RetroSimpleType

This will be used to describe a simple game type, where one MIME type
match one platform and vice versa. It will help simplifying game type
declaration.
Comment 2 Adrien Plazas 2017-05-26 05:17:41 UTC
Created attachment 352604 [details] [review]
retro: Add RetroSimpleGameUriAdapter

This will be used to avoid code duplication in many plugins.
Comment 3 Adrien Plazas 2017-05-26 05:17:48 UTC
Created attachment 352605 [details] [review]
ui: Register game types from the application

Make the application register simple game types from the constant
RETRO_SIMPLE_GAME_TYPES array.

This will allow to replace many plugins by a few lines in this array.
Comment 4 Adrien Plazas 2017-05-26 05:17:56 UTC
Created attachment 352606 [details] [review]
amiga: Replace the plugin by a simple type
Comment 5 Adrien Plazas 2017-05-26 05:18:02 UTC
Created attachment 352607 [details] [review]
atari-2600: Replace the plugin by a simple type
Comment 6 Adrien Plazas 2017-05-26 05:18:08 UTC
Created attachment 352608 [details] [review]
atari-7800: Replace the plugin by a simple type
Comment 7 Adrien Plazas 2017-05-26 05:18:14 UTC
Created attachment 352609 [details] [review]
atari-lynx: Replace the plugin by a simple type
Comment 8 Adrien Plazas 2017-05-26 05:18:21 UTC
Created attachment 352610 [details] [review]
doom: Replace the plugin by a simple type
Comment 9 Adrien Plazas 2017-05-26 05:18:28 UTC
Created attachment 352611 [details] [review]
game-boy: Replace the plugin by simple types
Comment 10 Adrien Plazas 2017-05-26 05:18:35 UTC
Created attachment 352612 [details] [review]
game-boy-advance: Replace the plugin by a simple type
Comment 11 Adrien Plazas 2017-05-26 05:18:42 UTC
Created attachment 352613 [details] [review]
master-system: Replace the plugin by simple types
Comment 12 Adrien Plazas 2017-05-26 05:18:50 UTC
Created attachment 352614 [details] [review]
mega-drive: Move cartridge types to simple types
Comment 13 Adrien Plazas 2017-05-26 05:18:56 UTC
Created attachment 352615 [details] [review]
Replace mega-drive plugin by sega-cd plugin

The mega-drive plugin stopped handling all Sega Genesis related types
in the previous commit and was only handling the Sega CD types. This
replacement makes the role of this plugin more clear.
Comment 14 Adrien Plazas 2017-05-26 05:19:04 UTC
Created attachment 352616 [details] [review]
ms-dos: Replace the plugin by a simple type
Comment 15 Adrien Plazas 2017-05-26 05:19:10 UTC
Created attachment 352617 [details] [review]
neo-geo-pocket: Replace the plugin by a simple type
Comment 16 Adrien Plazas 2017-05-26 05:19:17 UTC
Created attachment 352618 [details] [review]
nes: Replace the plugin by simple types
Comment 17 Adrien Plazas 2017-05-26 05:19:24 UTC
Created attachment 352619 [details] [review]
nintendo-64: Replace the plugin by a simple type
Comment 18 Adrien Plazas 2017-05-26 05:19:31 UTC
Created attachment 352620 [details] [review]
pc-engine: Move cartridge types to simple types
Comment 19 Adrien Plazas 2017-05-26 05:19:37 UTC
Created attachment 352621 [details] [review]
Replace pc-engine plugin by turbografx-cd plugin

The pc-engine plugin stopped handling all TurboGrafx-16 related types in
the previous commit and was only handling the TurboGrafx-CD types. This
replacement makes the role of this plugin more clear.
Comment 20 Adrien Plazas 2017-05-26 05:19:44 UTC
Created attachment 352622 [details] [review]
snes: Replace the plugin by a simple type
Comment 21 Adrien Plazas 2017-05-26 05:19:51 UTC
Created attachment 352623 [details] [review]
wii-ware: Replace the plugin by a simple type
Comment 22 Adrien Plazas 2017-05-26 05:19:57 UTC
Created attachment 352624 [details] [review]
wonderswan: Replace the plugin by simple types
Comment 23 Adrien Plazas 2017-05-26 05:43:02 UTC
Attachment 352603 [details] pushed as 7472dc7 - retro: Add RetroSimpleType
Attachment 352604 [details] pushed as e15b879 - retro: Add RetroSimpleGameUriAdapter
Attachment 352605 [details] pushed as f873550 - ui: Register game types from the application
Attachment 352606 [details] pushed as cee0de4 - amiga: Replace the plugin by a simple type
Attachment 352607 [details] pushed as 2f7b72b - atari-2600: Replace the plugin by a simple type
Attachment 352608 [details] pushed as b2fc090 - atari-7800: Replace the plugin by a simple type
Attachment 352609 [details] pushed as df69c85 - atari-lynx: Replace the plugin by a simple type
Attachment 352610 [details] pushed as dc29dac - doom: Replace the plugin by a simple type
Attachment 352611 [details] pushed as 65e5c1a - game-boy: Replace the plugin by simple types
Attachment 352612 [details] pushed as 4ff9364 - game-boy-advance: Replace the plugin by a simple type
Attachment 352613 [details] pushed as 76a795d - master-system: Replace the plugin by simple types
Attachment 352614 [details] pushed as e991afe - mega-drive: Move cartridge types to simple types
Attachment 352615 [details] pushed as 276cbc8 - Replace mega-drive plugin by sega-cd plugin
Attachment 352616 [details] pushed as 14cf007 - ms-dos: Replace the plugin by a simple type
Attachment 352617 [details] pushed as 22f1e76 - neo-geo-pocket: Replace the plugin by a simple type
Attachment 352618 [details] pushed as 3b7a02a - nes: Replace the plugin by simple types
Attachment 352619 [details] pushed as 89a2576 - nintendo-64: Replace the plugin by a simple type
Attachment 352620 [details] pushed as 202af19 - pc-engine: Move cartridge types to simple types
Attachment 352621 [details] pushed as 96be049 - Replace pc-engine plugin by turbografx-cd plugin
Attachment 352622 [details] pushed as 7206bef - snes: Replace the plugin by a simple type
Attachment 352623 [details] pushed as d8e90c0 - wii-ware: Replace the plugin by a simple type
Attachment 352624 [details] pushed as 1ad2594 - wonderswan: Replace the plugin by simple types