Commit d92c9a36 authored by Jordi Mas's avatar Jordi Mas

Remove code

parent 4f060901
Pipeline #85309 failed with stage
in 4 minutes and 35 seconds
......@@ -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;
......
......@@ -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 ()
......
......@@ -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
......
......@@ -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)
{
......
......@@ -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 ());
}
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment