[gnome-games/wip/exalm/rebrand: 96/102] retro-core-manager: Move to core/




commit 0e041ea1fafeda6625d3928065c5be1658ca902f
Author: Alexander Mikhaylenko <alexm gnome org>
Date:   Wed Mar 31 00:57:28 2021 +0500

    retro-core-manager: Move to core/

 src/{retro/retro-core-manager.vala => core/core-manager.vala} | 10 +++++-----
 src/core/migrator.vala                                        |  2 +-
 src/meson.build                                               |  2 +-
 src/preferences/preferences-page-platform-row.vala            |  4 ++--
 src/retro/retro-core-source.vala                              |  2 +-
 5 files changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/src/retro/retro-core-manager.vala b/src/core/core-manager.vala
similarity index 92%
rename from src/retro/retro-core-manager.vala
rename to src/core/core-manager.vala
index 0e9a0821..bbd79f8d 100644
--- a/src/retro/retro-core-manager.vala
+++ b/src/core/core-manager.vala
@@ -1,20 +1,20 @@
 // This file is part of GNOME Games. License: GPL-3.0+.
 
-public class Games.RetroCoreManager : Object {
-       private static RetroCoreManager instance;
+public class Games.CoreManager : Object {
+       private static CoreManager instance;
 
        private Retro.CoreDescriptor[] core_descriptors;
        private HashTable<string, Retro.CoreDescriptor> core_descriptor_ids;
        private bool searched;
 
-       public static RetroCoreManager get_instance () {
+       public static CoreManager get_instance () {
                if (instance == null)
-                       instance = new RetroCoreManager ();
+                       instance = new CoreManager ();
 
                return instance;
        }
 
-       private RetroCoreManager () {
+       private CoreManager () {
                searched = false;
                core_descriptors = {};
                core_descriptor_ids = new HashTable<string, Retro.CoreDescriptor> (str_hash, str_equal);
diff --git a/src/core/migrator.vala b/src/core/migrator.vala
index 81ffa3ad..ff70eb65 100644
--- a/src/core/migrator.vala
+++ b/src/core/migrator.vala
@@ -199,7 +199,7 @@ class Games.Migrator : Object {
 
                // Getting the core_id
                var platform = platform_from_game_uid (game_uid);
-               var core_manager = RetroCoreManager.get_instance ();
+               var core_manager = CoreManager.get_instance ();
                var preferred_core = core_manager.get_preferred_core (platform);
                var core_id = preferred_core.get_id ();
 
diff --git a/src/meson.build b/src/meson.build
index 06ef6dfe..4158db3b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -20,6 +20,7 @@ vala_sources = [
   'collection/user-collection.vala',
 
   'core/core.vala',
+  'core/core-manager.vala',
   'core/cover.vala',
   'core/cover-loader.vala',
   'core/firmware.vala',
@@ -137,7 +138,6 @@ vala_sources = [
   'preferences/preferences-subpage-keyboard.vala',
   'preferences/preferences-window.vala',
 
-  'retro/retro-core-manager.vala',
   'retro/retro-core-source.vala',
   'retro/retro-error.vala',
   'retro/retro-gamepad.vala',
diff --git a/src/preferences/preferences-page-platform-row.vala 
b/src/preferences/preferences-page-platform-row.vala
index 051fa286..c923594e 100644
--- a/src/preferences/preferences-page-platform-row.vala
+++ b/src/preferences/preferences-page-platform-row.vala
@@ -20,7 +20,7 @@ private class Games.PreferencesPagePlatformRow : Hdy.ComboRow {
 
                model = new ListStore (typeof (Retro.CoreDescriptor));
 
-               var core_manager = RetroCoreManager.get_instance ();
+               var core_manager = CoreManager.get_instance ();
                var cores = core_manager.get_cores_for_platform (platform);
 
                foreach (var core in cores)
@@ -50,7 +50,7 @@ private class Games.PreferencesPagePlatformRow : Hdy.ComboRow {
                if (core == null)
                        return;
 
-               var core_manager = RetroCoreManager.get_instance ();
+               var core_manager = CoreManager.get_instance ();
                core_manager.set_preferred_core (platform, core);
        }
 }
diff --git a/src/retro/retro-core-source.vala b/src/retro/retro-core-source.vala
index e1f5a267..8d37b8ac 100644
--- a/src/retro/retro-core-source.vala
+++ b/src/retro/retro-core-source.vala
@@ -50,7 +50,7 @@ public class Games.RetroCoreSource : Object {
        }
 
        private void search_module () throws Error {
-               var core_manager = RetroCoreManager.get_instance ();
+               var core_manager = CoreManager.get_instance ();
 
                var core_descriptors = core_manager.get_cores_for_platform (platform);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]