changeset 18:c4d9b1ec75ed

Re #124: Remove "factory factory" * Replace calls to factory factory with direct invocation of "get factory" methods in GTK# UI
author IBBoard <dev@ibboard.co.uk>
date Sat, 15 Aug 2009 09:33:51 +0000
parents 7653fab9d70e
children a191d0655f55
files FrmMainWindow.cs gtk-gui/objects.xml
diffstat 2 files changed, 7 insertions(+), 14 deletions(-) [+]
line diff
     1.1 --- a/FrmMainWindow.cs	Tue Jul 14 18:33:52 2009 +0000
     1.2 +++ b/FrmMainWindow.cs	Sat Aug 15 09:33:51 2009 +0000
     1.3 @@ -129,21 +129,10 @@
     1.4  			FailedUnitRequirementMethod = new FailedUnitRequirementDelegate(OnFailedUnitRequirement);
     1.5  			UnitNameChangedMethod = new StringValChangedDelegate(OnUnitNameChanged);
     1.6  			
     1.7 -			//FIXME: Temporary hack to add paths and factories
     1.8 +			//FIXME: Temporary hack to add paths and factories before we get preferences and plugins
     1.9  			WarFoundryLoader.GetDefault().AddLoadDirectory(new DirectoryInfo(Constants.ExecutablePath + Constants.DirectoryString + "data"));
    1.10 -			IWarFoundryFactory factory = WarFoundryFactoryFactory.GetFactoryFactory().GetFactory(typeof(WarFoundryXmlFactory));
    1.11 -			
    1.12 -			if (factory!=null && factory is WarFoundryXmlFactory)
    1.13 -			{
    1.14 -				WarFoundryLoader.GetDefault().RegisterFactory((WarFoundryXmlFactory)factory);
    1.15 -			}
    1.16 -			
    1.17 -			factory = WarFoundryFactoryFactory.GetFactoryFactory().GetFactory(typeof(RollcallFactory));
    1.18 -			
    1.19 -			if (factory!=null && factory is RollcallFactory)
    1.20 -			{
    1.21 -				WarFoundryLoader.GetDefault().RegisterNonNativeFactory((INonNativeWarFoundryFactory)factory);
    1.22 -			}
    1.23 +			WarFoundryLoader.GetDefault().RegisterFactory(WarFoundryXmlFactory.GetFactory());
    1.24 +			WarFoundryLoader.GetDefault().RegisterNonNativeFactory(RollcallFactory.GetFactory());
    1.25  			
    1.26  			logger.Debug("Initialising complete - seeing if we can load default army or system");
    1.27  								
     2.1 --- a/gtk-gui/objects.xml	Tue Jul 14 18:33:52 2009 +0000
     2.2 +++ b/gtk-gui/objects.xml	Sat Aug 15 09:33:51 2009 +0000
     2.3 @@ -1,2 +1,6 @@
     2.4  <objects attr-sync="on">
     2.5 +  <object type="IBBoard.WarFoundry.GTK.Widgets.UnitDisplayWidget" palette-category="WarFoundry GTK# GUI" allow-children="false" base-type="Gtk.Bin">
     2.6 +    <itemgroups />
     2.7 +    <signals />
     2.8 +  </object>
     2.9  </objects>
    2.10 \ No newline at end of file