Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
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 wrap: on
line diff
--- a/FrmMainWindow.cs Tue May 15 21:00:29 2012 +0100 +++ b/FrmMainWindow.cs Sat May 19 14:39:10 2012 +0100 @@ -1312,8 +1312,7 @@ { foreach (string filePath in filePaths) { - string newFilePath = System.IO.Path.Combine(WarFoundryHacks.dataPath, System.IO.Path.GetFileName(filePath)); - File.Copy(filePath, newFilePath); + WarFoundryLoader.AddNewDataFile(filePath); } WarFoundryLoader.GetDefault().LoadFiles();
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Tue May 15 21:00:29 2012 +0100 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Sat May 19 14:39:10 2012 +0100 @@ -31,7 +31,6 @@ private global::Gtk.Action miPreferences; private global::Gtk.Action miExportArmyAsTransformedXml; private global::Gtk.Action miEditArmy; - private global::Gtk.Action AddNewFileAction; private global::Gtk.Action miAddDataFile; private global::Gtk.VBox vbox1; private global::Gtk.MenuBar menubar1; @@ -240,14 +239,6 @@ this.miEditArmy.Sensitive = false; this.miEditArmy.ShortLabel = global::Mono.Unix.Catalog.GetString ("_edit army"); w1.Add (this.miEditArmy, null); - this.AddNewFileAction = new global::Gtk.Action ( - "AddNewFileAction", - global::Mono.Unix.Catalog.GetString("Add new file"), - null, - null - ); - this.AddNewFileAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Add new file"); - w1.Add (this.AddNewFileAction, null); this.miAddDataFile = new global::Gtk.Action ( "miAddDataFile", global::Mono.Unix.Catalog.GetString("Add data file"), @@ -359,7 +350,6 @@ this.miPreferences.Activated += new global::System.EventHandler (this.miPreferencesClicked); this.miExportArmyAsTransformedXml.Activated += new global::System.EventHandler (this.OnTransformedXmlActionActivated); this.miEditArmy.Activated += new global::System.EventHandler (this.OnMiEditArmyActivated); - this.AddNewFileAction.Activated += new global::System.EventHandler (this.OnAddNewFileActionActivated); this.miAddDataFile.Activated += new global::System.EventHandler (this.OnAddNewFileActionActivated); this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler (this.ArmyRowActivated); this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler (this.OnTreeUnitsPopupMenu);