[gbrainy] Remove code



commit d92c9a36e9202ece9bbdac99e7483d1ec94e2dfc
Author: Jordi Mas <jmas softcatala org>
Date:   Thu May 30 21:04:25 2019 +0200

    Remove code

 src/Clients/Classical/Dialogs/PreferencesDialog.cs |  6 ---
 src/Clients/Classical/gbrainy.cs                   |  6 ---
 src/Clients/WebForms/Makefile.am                   |  3 +-
 src/Core/Main/GameManager.cs                       | 60 ----------------------
 src/Core/Main/Preferences.cs                       |  2 -
 tests/Makefile.am                                  |  1 -
 6 files changed, 1 insertion(+), 77 deletions(-)
---
diff --git a/src/Clients/Classical/Dialogs/PreferencesDialog.cs 
b/src/Clients/Classical/Dialogs/PreferencesDialog.cs
index 0d80166a..95b64813 100644
--- a/src/Clients/Classical/Dialogs/PreferencesDialog.cs
+++ b/src/Clients/Classical/Dialogs/PreferencesDialog.cs
@@ -51,7 +51,6 @@ namespace gbrainy.Clients.Classical.Dialogs
                        minplayedspinbutton.Value = Preferences.Get <int> (Preferences.MinPlayedGamesKey);
                        colorblindcheckbutton.Active = Preferences.Get <bool> (Preferences.ColorBlindKey);
                        englishcheckbutton.Active = Preferences.Get <bool> (Preferences.EnglishKey);
-                       loadextensionscheckbutton.Active = Preferences.Get <bool> 
(Preferences.LoadPlugginsKey);
                        usesoundscheckbutton.Active = Preferences.Get <bool> (Preferences.SoundsKey);
 
                        switch ((GameDifficulty) Preferences.Get <int> (Preferences.DifficultyKey)) {
@@ -89,10 +88,6 @@ namespace gbrainy.Clients.Classical.Dialogs
                                }
                                more = store.IterNext (ref iter);
                        }
-
-                       #if !MONO_ADDINS
-                               loadextensionscheckbutton.Visible = false;
-                       #endif
                }
 
                private GameDifficulty Difficulty {
@@ -132,7 +127,6 @@ namespace gbrainy.Clients.Classical.Dialogs
                        Preferences.Set <int>  (Preferences.MinPlayedGamesKey, (int) 
minplayedspinbutton.Value);
                        Preferences.Set <bool> (Preferences.ColorBlindKey, colorblindcheckbutton.Active);
                        Preferences.Set <bool> (Preferences.EnglishKey, englishcheckbutton.Active);
-                       Preferences.Set <bool> (Preferences.LoadPlugginsKey, 
loadextensionscheckbutton.Active);
                        Preferences.Set <bool> (Preferences.SoundsKey, usesoundscheckbutton.Active);
 
                        TreeIter iter;
diff --git a/src/Clients/Classical/gbrainy.cs b/src/Clients/Classical/gbrainy.cs
index d4a7c15c..a0f23320 100644
--- a/src/Clients/Classical/gbrainy.cs
+++ b/src/Clients/Classical/gbrainy.cs
@@ -112,12 +112,6 @@ namespace gbrainy.Clients.Classical
                        gm.LoadAssemblyGames (Defines.GAME_ASSEMBLY);
                        gm.LoadVerbalAnalogies (System.IO.Path.Combine (Defines.DATA_DIR, 
Defines.VERBAL_ANALOGIES));
                        gm.LoadGamesFromXml (System.IO.Path.Combine (Defines.DATA_DIR, Defines.GAMES_FILE));
-
-                       if (Preferences.Get <bool> (Preferences.LoadPlugginsKey))
-                       {                       
-                               gm.LoadPlugins ();
-                               pluggins_loaded = true;
-                       }
                }
 
                void BuildUI ()
diff --git a/src/Clients/WebForms/Makefile.am b/src/Clients/WebForms/Makefile.am
index 6a3f4460..e7c71f2c 100644
--- a/src/Clients/WebForms/Makefile.am
+++ b/src/Clients/WebForms/Makefile.am
@@ -29,8 +29,7 @@ GBRAINY_CSDISTFILES =         \
 
 ASSEMBLIES = \
         $(GBRAINY_LIBS)                \
-        $(MONO_ADDINS_LIBS)            \
-       -r:System.Web                   \
+        r:System.Web                   \
        -r:Mono.Cairo.dll               \
        -r:../../gbrainy.Core.dll       \
        -r:Mono.Posix
diff --git a/src/Core/Main/GameManager.cs b/src/Core/Main/GameManager.cs
index 4a145e57..6716f787 100644
--- a/src/Core/Main/GameManager.cs
+++ b/src/Core/Main/GameManager.cs
@@ -20,12 +20,6 @@ using System.Collections.Generic;
 using System.Reflection;
 
 using gbrainy.Core.Services;
-
-#if MONO_ADDINS
-using Mono.Addins;
-using Mono.Addins.Setup;
-#endif
-
 using gbrainy.Core.Main.Verbal;
 using gbrainy.Core.Main.Xml;
 
@@ -175,60 +169,6 @@ namespace gbrainy.Core.Main
                        }
                }
 
-               // Load Mono plugins
-               public void LoadPlugins ()
-               {
-
-       #if MONO_ADDINS
-                       try {
-                               ExtensionNodeList addins;
-                               Game game;
-                               Type [] type = new Type [1];
-                               string dir = System.IO.Path.Combine (Environment.GetFolderPath 
(Environment.SpecialFolder.ApplicationData), "gbrainy");
-
-                               AddinManager.Initialize (dir);
-                               AddinManager.Registry.Update (null);
-                               new SetupService (AddinManager.Registry);
-
-                               addins = AddinManager.GetExtensionNodes ("/gbrainy/games/logic");
-                               foreach (TypeExtensionNode node in addins) {
-                                       game = (Game) node.CreateInstance ();
-                                       Console.WriteLine ("Loading external logic game: {0}", game);
-                                       type [0] = game.GetType ();
-                                       AddGamesAndVariations (type);
-                               }
-
-                               addins = AddinManager.GetExtensionNodes ("/gbrainy/games/memory");
-                               foreach (TypeExtensionNode node in addins) {
-                                       game = (Game) node.CreateInstance ();
-                                       Console.WriteLine ("Loading external memory game: {0}", game);
-                                       type [0] = game.GetType ();
-                                       AddGamesAndVariations (type);
-                               }
-
-                               addins = AddinManager.GetExtensionNodes ("/gbrainy/games/calculation");
-                               foreach (TypeExtensionNode node in addins) {
-                                       game = (Game) node.CreateInstance ();
-                                       Console.WriteLine ("Loading external calculation game: {0}", game);
-                                       type [0] = game.GetType ();
-                                       AddGamesAndVariations (type);
-                               }
-
-                               addins = AddinManager.GetExtensionNodes ("/gbrainy/games/verbal");
-                               foreach (TypeExtensionNode node in addins) {
-                                       game = (Game) node.CreateInstance ();
-                                       Console.WriteLine ("Loading external verbal analogy game: {0}", game);
-                                       type [0] = game.GetType ();
-                                       AddGamesAndVariations (type);
-                               }
-                       }
-                       catch (Exception e)
-                       {
-                               Console.WriteLine ("GameManager.LoadPlugins. Error loading plugins. Error 
{0}", e);
-                       }
-       #endif
-               }
-
                // Load an XML file with analogies
                public void LoadVerbalAnalogies (string file)
                {
diff --git a/src/Core/Main/Preferences.cs b/src/Core/Main/Preferences.cs
index 7428fba5..71628ca0 100644
--- a/src/Core/Main/Preferences.cs
+++ b/src/Core/Main/Preferences.cs
@@ -40,7 +40,6 @@ namespace gbrainy.Core.Main
                public const string ThemeKey = "Theme";
                public const string EnglishKey = "English";
                public const string EnglishVersionKey = "EnglishVersion";
-               public const string LoadPlugginsKey = "LoadExtensions";
                public const string SoundsKey = "Sounds";
 
                static Preferences ()
@@ -139,7 +138,6 @@ namespace gbrainy.Core.Main
                        defaults.Add (ThemeKey, "notebook");
                        defaults.Add (EnglishVersionKey, string.Empty);
                        defaults.Add (EnglishKey, false.ToString ());
-                       defaults.Add (LoadPlugginsKey, false.ToString ());
                        defaults.Add (SoundsKey, true.ToString ());
                }
 
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6bc2c734..3ab88591 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -32,7 +32,6 @@ if ENABLE_TESTS
 
 ASSEMBLIES = \
        $(NUNIT_LIBS)                   \
-       $(MONO_ADDINS_LIBS)             \
        -r:$(top_builddir)/src/gbrainy.Core.dll \
        -r:$(top_builddir)/src/gbrainy.exe
 


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