changeset 158:6b4cc1fc3f42

Re #417: Improve WarFoundry installation experience * Make use of new library call to add data files
author IBBoard <dev@ibboard.co.uk>
date Sat, 19 May 2012 14:39:10 +0100
parents 2d1dd73a3289
children 89e2442bbb60
files FrmMainWindow.cs gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs
diffstat 2 files changed, 1 insertions(+), 12 deletions(-) [+]
line diff
     1.1 --- a/FrmMainWindow.cs	Tue May 15 21:00:29 2012 +0100
     1.2 +++ b/FrmMainWindow.cs	Sat May 19 14:39:10 2012 +0100
     1.3 @@ -1312,8 +1312,7 @@
     1.4  			{
     1.5  				foreach (string filePath in filePaths)
     1.6  				{
     1.7 -					string newFilePath = System.IO.Path.Combine(WarFoundryHacks.dataPath, System.IO.Path.GetFileName(filePath));
     1.8 -					File.Copy(filePath, newFilePath);
     1.9 +					WarFoundryLoader.AddNewDataFile(filePath);
    1.10  				}
    1.11  
    1.12  				WarFoundryLoader.GetDefault().LoadFiles();
     2.1 --- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Tue May 15 21:00:29 2012 +0100
     2.2 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs	Sat May 19 14:39:10 2012 +0100
     2.3 @@ -31,7 +31,6 @@
     2.4  		private global::Gtk.Action miPreferences;
     2.5  		private global::Gtk.Action miExportArmyAsTransformedXml;
     2.6  		private global::Gtk.Action miEditArmy;
     2.7 -		private global::Gtk.Action AddNewFileAction;
     2.8  		private global::Gtk.Action miAddDataFile;
     2.9  		private global::Gtk.VBox vbox1;
    2.10  		private global::Gtk.MenuBar menubar1;
    2.11 @@ -240,14 +239,6 @@
    2.12  			this.miEditArmy.Sensitive = false;
    2.13  			this.miEditArmy.ShortLabel = global::Mono.Unix.Catalog.GetString ("_edit army");
    2.14  			w1.Add (this.miEditArmy, null);
    2.15 -			this.AddNewFileAction = new global::Gtk.Action (
    2.16 -				"AddNewFileAction",
    2.17 -				global::Mono.Unix.Catalog.GetString("Add new file"),
    2.18 -				null,
    2.19 -				null
    2.20 -			);
    2.21 -			this.AddNewFileAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add new file");
    2.22 -			w1.Add (this.AddNewFileAction, null);
    2.23  			this.miAddDataFile = new global::Gtk.Action (
    2.24  				"miAddDataFile",
    2.25  				global::Mono.Unix.Catalog.GetString("Add data file"),
    2.26 @@ -359,7 +350,6 @@
    2.27  			this.miPreferences.Activated += new global::System.EventHandler (this.miPreferencesClicked);
    2.28  			this.miExportArmyAsTransformedXml.Activated += new global::System.EventHandler (this.OnTransformedXmlActionActivated);
    2.29  			this.miEditArmy.Activated += new global::System.EventHandler (this.OnMiEditArmyActivated);
    2.30 -			this.AddNewFileAction.Activated += new global::System.EventHandler (this.OnAddNewFileActionActivated);
    2.31  			this.miAddDataFile.Activated += new global::System.EventHandler (this.OnAddNewFileActionActivated);
    2.32  			this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler (this.ArmyRowActivated);
    2.33  			this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler (this.OnTreeUnitsPopupMenu);