changeset 36:d68992a831df

Fixes #182: Make GTK# more like WinForms UI * Remove "Change Game System" option * Delete "Change Game System" dialogs * Add game system selection to army creation
author IBBoard <dev@ibboard.co.uk>
date Sat, 16 Jan 2010 16:36:12 +0000
parents 1b603f97e7de
children 8bc24ef82258
files FrmChangeGameSystem.cs FrmMainWindow.cs FrmNewArmy.cs IBBoard.WarFoundry.GUI.GTK.csproj gtk-gui/IBBoard.WarFoundry.GTK.FrmChangeGameSystem.cs gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs gtk-gui/gui.stetic
diffstat 8 files changed, 180 insertions(+), 324 deletions(-) [+]
line wrap: on
line diff
--- a/FrmChangeGameSystem.cs	Sat Jan 16 11:07:15 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +0,0 @@
-// This file (FrmChangeGameSystem.cs) is a part of the IBBoard.WarFoundry.GTK project and is copyright 2008, 2009 IBBoard.
-//
-// The file and the library/program it is in are licensed and distributed, without warranty, under the GNU Affero GPL license, either version 3 of the License or (at your option) any later version. Please see COPYING for more information and the full license.
-
-using System;
-using IBBoard.WarFoundry.API;
-using IBBoard.WarFoundry.API.Objects;
-using Gtk;
-using log4net;
-
-namespace IBBoard.WarFoundry.GTK
-{
-	public partial class FrmChangeGameSystem : Dialog
-	{
-		private ILog logger = LogManager.GetLogger(typeof(FrmChangeGameSystem));
-		//private AbstractNativeWarFoundryFactory factory;
-		private GameSystem selectedSystem;
-		
-		public FrmChangeGameSystem(Window parent) : base("Change Game System", parent, DialogFlags.Modal)
-		{
-			this.Build();
-			lstGameSystems.Selection.Changed+= new EventHandler(OnSelectionChanged);
-			TreeViewColumn gameSystemColumn = new TreeViewColumn ();
-			gameSystemColumn.Title = "Game System";
-			CellRendererText gameSystemCell = new CellRendererText ();
-			gameSystemColumn.PackStart (gameSystemCell, true);
-			lstGameSystems.AppendColumn(gameSystemColumn);
-			gameSystemColumn.SetCellDataFunc (gameSystemCell, new TreeCellDataFunc (RenderSystemName));
-			ListStore store = new ListStore(typeof(GameSystem));
-			
-			foreach (GameSystem system in WarFoundryLoader.GetDefault().GetGameSystems())
-			{
-				store.AppendValues(system);
-			}
-			
-			lstGameSystems.Model = store;
-		}
-		
-		private void RenderSystemName(TreeViewColumn column, CellRenderer cell, TreeModel model, TreeIter iter)
-		{
-			GameSystem system = (GameSystem) model.GetValue(iter, 0);
-			(cell as CellRendererText).Text = system.Name;
-		}
-
-		protected virtual void OnGameSystemOkayClicked(object sender, EventArgs e)
-		{
-			logger.Debug("Okay clicked");
-			SetReturnValue();
-			Respond(ResponseType.Ok);
-		}
-		
-		private void SetReturnValue()
-		{
-			TreeModel model;
-			TreeIter iter;
-			lstGameSystems.Selection.GetSelected (out model, out iter);
-			selectedSystem = (GameSystem) model.GetValue(iter, 0);
-		}
-
-		protected virtual void OnSelectionChanged(object o, EventArgs e)
-		{
-			logger.Debug("Selection changed");
-			buttonOk.Sensitive = (lstGameSystems.Selection.CountSelectedRows() > 0);
-		}
-
-		protected virtual void OnCancel (object sender, System.EventArgs e)
-		{
-			logger.Debug("Cancel clicked");
-			Respond(ResponseType.Cancel);
-		}
-
-		protected virtual void lstGameSystemsRowActivated (object o, Gtk.RowActivatedArgs args)
-		{
-			logger.Debug("List row double-clicked");
-			SetReturnValue();
-			Respond(ResponseType.Ok);
-		}
-		
-		public GameSystem SelectedSystem
-		{
-			get { return selectedSystem; }
-		}
-	}
-}
--- a/FrmMainWindow.cs	Sat Jan 16 11:07:15 2010 +0000
+++ b/FrmMainWindow.cs	Sat Jan 16 16:36:12 2010 +0000
@@ -360,11 +360,6 @@
 			Application.Quit();
 		}
 
-		protected virtual void OnChangeGameSystemActivated(object sender, System.EventArgs e)
-		{
-			ChangeCurrentGameSystem();
-		}
-
 		protected virtual void OnCreateArmyActivated(object sender, System.EventArgs e)
 		{
 			CreateNewArmy();
@@ -444,8 +439,6 @@
 		{
 			system = newSys;
 			SetAppTitle();
-			miCreateArmy.Sensitive = system!=null;
-			newArmyButton.Sensitive = system!=null;
 			RemoveCategoryButtons();
 
 			if (system!=null)
@@ -882,25 +875,6 @@
 			newArmy.Destroy();
 		}
 
-		private void ChangeCurrentGameSystem()
-		{
-			logger.Debug("Changing game system");
-			FrmChangeGameSystem dialog = new FrmChangeGameSystem(this);
-			ResponseType type = (ResponseType)dialog.Run();
-			dialog.Hide();
-
-			if (type == ResponseType.Ok)
-			{
-				WarFoundryCore.CurrentGameSystem = dialog.SelectedSystem;
-			}
-			else
-			{
-				logger.Debug("Game system change cancelled");
-			}
-
-			dialog.Destroy();
-		}
-
 		protected virtual void undoTBButtonActivated (object sender, System.EventArgs e)
 		{
 			CommandStack.Undo();
--- a/FrmNewArmy.cs	Sat Jan 16 11:07:15 2010 +0000
+++ b/FrmNewArmy.cs	Sat Jan 16 16:36:12 2010 +0000
@@ -7,6 +7,7 @@
 using IBBoard.Lang;
 using IBBoard.WarFoundry.API;
 using IBBoard.WarFoundry.API.Objects;
+using IBBoard.GtkSharp;
 using log4net;
 
 namespace IBBoard.WarFoundry.GTK
@@ -14,7 +15,6 @@
 	public partial class FrmNewArmy : Dialog, ITranslatable
 	{
 		private ILog logger = LogManager.GetLogger(typeof(FrmNewArmy));
-		private GameSystem system;
 		private Race race;
 		private string armyName;
 		private int pointsValue;
@@ -23,22 +23,32 @@
 		{
 			this.Build();
 			
-			system = gameSystem;
+			GameSystem[] gameSystems = WarFoundryLoader.GetDefault().GetGameSystems();
+			ComboBoxUtils.FillCombo(systemCombo, gameSystems, delegate(GameSystem sys){return sys.Name;});
+			
+			if (gameSystem != null)
+			{
+				ComboBoxUtils.SelectItem(systemCombo, gameSystem);
+			}
+			else if (gameSystems.Length == 1)
+			{
+				ComboBoxUtils.SelectIndex(systemCombo, 0);
+			}
+			
 			lstRaces.Selection.Changed+= new EventHandler(OnSelectionChanged);
+			
 			TreeViewColumn raceColumn = new TreeViewColumn ();
 			raceColumn.Title = "Race";
 			CellRendererText raceCell = new CellRendererText ();
 			raceColumn.PackStart (raceCell, true);
 			lstRaces.AppendColumn(raceColumn);
 			raceColumn.SetCellDataFunc(raceCell, new TreeCellDataFunc(RenderRaceName));
-			ListStore store = new ListStore(typeof(Race));
+
 			
-			foreach (Race r in WarFoundryLoader.GetDefault().GetRaces(system))
+			if (gameSystem!=null)
 			{
-				store.AppendValues(r);
+				SetRaces(gameSystem);
 			}
-			
-			lstRaces.Model = store;
 		}
 		
 		public string Text
@@ -55,13 +65,13 @@
 
 		protected virtual void OnSelectionChanged(object o, EventArgs e)
 		{
-			logger.Debug("Selection changed");
-			setOkayButtonState();
+			logger.Debug("Race selection changed");
+			SetOkayButtonState();
 		}
 		
-		private void setOkayButtonState()
+		private void SetOkayButtonState()
 		{
-			bttnCreate.Sensitive = (lstRaces.Selection.CountSelectedRows() > 0 && txtArmyName.Text!="" && sbPointsValue.Value > 0);
+			bttnCreate.Sensitive = (lstRaces.Selection.CountSelectedRows() == 1 && txtArmyName.Text!="" && sbPointsValue.Value > 0);
 		}
 
 		protected virtual void OnCreateClicked (object sender, System.EventArgs e)
@@ -82,17 +92,40 @@
 
 		protected virtual void OnTextChanged (object sender, System.EventArgs e)
 		{
-			setOkayButtonState();
+			SetOkayButtonState();
 		}
 
 		protected virtual void OnSpinChangeValue (object o, Gtk.ChangeValueArgs args)
 		{
-			setOkayButtonState();
+			SetOkayButtonState();
 		}
 
 		protected virtual void OnSpinValueChanged (object sender, System.EventArgs e)
 		{
-			setOkayButtonState();
+			SetOkayButtonState();
+		}
+		
+		protected virtual void OnSystemComboChanged (object sender, System.EventArgs e)
+		{
+			GameSystem system = ComboBoxUtils.GetSelectedItem<GameSystem>(systemCombo);
+			SetRaces(system);
+			logger.Debug("System selection changed: " + (system == null ? "null" : system.Name));
+			SetOkayButtonState();
+		}
+		
+		private void SetRaces(GameSystem system)
+		{	
+			ListStore store = new ListStore(typeof(Race));
+			
+			if (system != null)
+			{
+				foreach (Race race in WarFoundryLoader.GetDefault().GetRaces(system))
+				{
+					store.AppendValues(race);
+				}
+			}
+			
+			lstRaces.Model = store;
 		}
 		
 		public Race SelectedRace
--- a/IBBoard.WarFoundry.GUI.GTK.csproj	Sat Jan 16 11:07:15 2010 +0000
+++ b/IBBoard.WarFoundry.GUI.GTK.csproj	Sat Jan 16 16:36:12 2010 +0000
@@ -41,13 +41,11 @@
   -->
   <ItemGroup>
     <Compile Include="AssemblyInfo.cs" />
-    <Compile Include="FrmChangeGameSystem.cs" />
     <Compile Include="FrmMainWindow.cs" />
     <Compile Include="FrmNewArmy.cs" />
     <Compile Include="FrmNewUnit.cs" />
     <Compile Include="Widgets\UnitDisplayWidget.cs" />
     <Compile Include="gtk-gui\generated.cs" />
-    <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmChangeGameSystem.cs" />
     <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmMainWindow.cs" />
     <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmNewArmy.cs" />
     <Compile Include="gtk-gui\IBBoard.WarFoundry.GTK.FrmNewUnit.cs" />
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmChangeGameSystem.cs	Sat Jan 16 11:07:15 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,120 +0,0 @@
-// ------------------------------------------------------------------------------
-//  <autogenerated>
-//      This code was generated by a tool.
-//      
-// 
-//      Changes to this file may cause incorrect behavior and will be lost if 
-//      the code is regenerated.
-//  </autogenerated>
-// ------------------------------------------------------------------------------
-
-namespace IBBoard.WarFoundry.GTK {
-    
-    
-    public partial class FrmChangeGameSystem {
-        
-        private Gtk.HBox hbox1;
-        
-        private Gtk.Label lblGameSystem;
-        
-        private Gtk.ScrolledWindow GtkScrolledWindow;
-        
-        private Gtk.TreeView lstGameSystems;
-        
-        private Gtk.Button buttonCancel;
-        
-        private Gtk.Button buttonOk;
-        
-        protected virtual void Build() {
-            Stetic.Gui.Initialize(this);
-            // Widget IBBoard.WarFoundry.GTK.FrmChangeGameSystem
-            this.Name = "IBBoard.WarFoundry.GTK.FrmChangeGameSystem";
-            this.Title = Mono.Unix.Catalog.GetString("Change Game System");
-            this.Icon = Gdk.Pixbuf.LoadFromResource("App.ico");
-            this.TypeHint = ((Gdk.WindowTypeHint)(1));
-            this.WindowPosition = ((Gtk.WindowPosition)(4));
-            this.Modal = true;
-            this.Resizable = false;
-            this.AllowGrow = false;
-            this.DefaultWidth = 400;
-            this.DefaultHeight = 300;
-            this.SkipPagerHint = true;
-            this.SkipTaskbarHint = true;
-            // Internal child IBBoard.WarFoundry.GTK.FrmChangeGameSystem.VBox
-            Gtk.VBox w1 = this.VBox;
-            w1.Name = "dialog1_VBox";
-            w1.Spacing = 6;
-            w1.BorderWidth = ((uint)(2));
-            // Container child dialog1_VBox.Gtk.Box+BoxChild
-            this.hbox1 = new Gtk.HBox();
-            this.hbox1.Name = "hbox1";
-            this.hbox1.Spacing = 6;
-            // Container child hbox1.Gtk.Box+BoxChild
-            this.lblGameSystem = new Gtk.Label();
-            this.lblGameSystem.Name = "lblGameSystem";
-            this.lblGameSystem.LabelProp = Mono.Unix.Catalog.GetString("Game System");
-            this.hbox1.Add(this.lblGameSystem);
-            Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.lblGameSystem]));
-            w2.Position = 0;
-            w2.Expand = false;
-            w2.Fill = false;
-            // Container child hbox1.Gtk.Box+BoxChild
-            this.GtkScrolledWindow = new Gtk.ScrolledWindow();
-            this.GtkScrolledWindow.Name = "GtkScrolledWindow";
-            this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
-            // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
-            this.lstGameSystems = new Gtk.TreeView();
-            this.lstGameSystems.WidthRequest = 250;
-            this.lstGameSystems.HeightRequest = 125;
-            this.lstGameSystems.CanFocus = true;
-            this.lstGameSystems.Name = "lstGameSystems";
-            this.lstGameSystems.HeadersVisible = false;
-            this.GtkScrolledWindow.Add(this.lstGameSystems);
-            this.hbox1.Add(this.GtkScrolledWindow);
-            Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox1[this.GtkScrolledWindow]));
-            w4.Position = 1;
-            w1.Add(this.hbox1);
-            Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(w1[this.hbox1]));
-            w5.Position = 0;
-            // Internal child IBBoard.WarFoundry.GTK.FrmChangeGameSystem.ActionArea
-            Gtk.HButtonBox w6 = this.ActionArea;
-            w6.Name = "dialog1_ActionArea";
-            w6.Spacing = 6;
-            w6.BorderWidth = ((uint)(5));
-            w6.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
-            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
-            this.buttonCancel = new Gtk.Button();
-            this.buttonCancel.CanDefault = true;
-            this.buttonCancel.CanFocus = true;
-            this.buttonCancel.Name = "buttonCancel";
-            this.buttonCancel.UseStock = true;
-            this.buttonCancel.UseUnderline = true;
-            this.buttonCancel.Label = "gtk-cancel";
-            this.AddActionWidget(this.buttonCancel, -6);
-            Gtk.ButtonBox.ButtonBoxChild w7 = ((Gtk.ButtonBox.ButtonBoxChild)(w6[this.buttonCancel]));
-            w7.Expand = false;
-            w7.Fill = false;
-            // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
-            this.buttonOk = new Gtk.Button();
-            this.buttonOk.Sensitive = false;
-            this.buttonOk.CanDefault = true;
-            this.buttonOk.CanFocus = true;
-            this.buttonOk.Name = "buttonOk";
-            this.buttonOk.UseStock = true;
-            this.buttonOk.UseUnderline = true;
-            this.buttonOk.Label = "gtk-ok";
-            this.AddActionWidget(this.buttonOk, -5);
-            Gtk.ButtonBox.ButtonBoxChild w8 = ((Gtk.ButtonBox.ButtonBoxChild)(w6[this.buttonOk]));
-            w8.Position = 1;
-            w8.Expand = false;
-            w8.Fill = false;
-            if ((this.Child != null)) {
-                this.Child.ShowAll();
-            }
-            this.Show();
-            this.lstGameSystems.RowActivated += new Gtk.RowActivatedHandler(this.lstGameSystemsRowActivated);
-            this.buttonCancel.Clicked += new System.EventHandler(this.OnCancel);
-            this.buttonOk.Clicked += new System.EventHandler(this.OnGameSystemOkayClicked);
-        }
-    }
-}
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs	Sat Jan 16 11:07:15 2010 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs	Sat Jan 16 16:36:12 2010 +0000
@@ -27,8 +27,6 @@
         
         private Gtk.Action miCloseArmy;
         
-        private Gtk.Action miChangeGameSystem;
-        
         private Gtk.Action miReloadFiles;
         
         private Gtk.Action miExit;
@@ -86,7 +84,6 @@
             this.menuFile.ShortLabel = Mono.Unix.Catalog.GetString("File");
             w1.Add(this.menuFile, null);
             this.miCreateArmy = new Gtk.Action("miCreateArmy", Mono.Unix.Catalog.GetString("Create army"), null, "gtk-new");
-            this.miCreateArmy.Sensitive = false;
             this.miCreateArmy.ShortLabel = Mono.Unix.Catalog.GetString("Create army");
             w1.Add(this.miCreateArmy, null);
             this.miOpenArmy = new Gtk.Action("miOpenArmy", Mono.Unix.Catalog.GetString("Open army"), null, "gtk-open");
@@ -104,9 +101,6 @@
             this.miCloseArmy.Sensitive = false;
             this.miCloseArmy.ShortLabel = Mono.Unix.Catalog.GetString("Close army");
             w1.Add(this.miCloseArmy, null);
-            this.miChangeGameSystem = new Gtk.Action("miChangeGameSystem", Mono.Unix.Catalog.GetString("Change game system"), null, null);
-            this.miChangeGameSystem.ShortLabel = Mono.Unix.Catalog.GetString("Change game system");
-            w1.Add(this.miChangeGameSystem, null);
             this.miReloadFiles = new Gtk.Action("miReloadFiles", Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh");
             this.miReloadFiles.Sensitive = false;
             this.miReloadFiles.ShortLabel = Mono.Unix.Catalog.GetString("Reload files");
@@ -135,7 +129,6 @@
             this.miDebugInformation.ShortLabel = Mono.Unix.Catalog.GetString("Debug Information");
             w1.Add(this.miDebugInformation, null);
             this.newArmyButton = new Gtk.Action("newArmyButton", null, null, "gtk-new");
-            this.newArmyButton.Sensitive = false;
             w1.Add(this.newArmyButton, null);
             this.openArmyButton = new Gtk.Action("openArmyButton", null, null, "gtk-open");
             w1.Add(this.openArmyButton, null);
@@ -168,7 +161,7 @@
             this.vbox1 = new Gtk.VBox();
             this.vbox1.Name = "vbox1";
             // Container child vbox1.Gtk.Box+BoxChild
-            this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miCreateArmy' action='miCreateArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmy' action='miExportArmy'><menuitem name='miExportAsBasicHtml' action='miExportAsBasicHtml'/></menu><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='miChangeGameSystem' action='miChangeGameSystem'/><separator/><menuitem name='miReloadFiles' action='miReloadFiles'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/><menuitem name='miDebugInformation' action='miDebugInformation'/></menu></menubar></ui>");
+            this.UIManager.AddUiFromString("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miCreateArmy' action='miCreateArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmy' action='miExportArmy'><menuitem name='miExportAsBasicHtml' action='miExportAsBasicHtml'/></menu><menuitem name='miCloseArmy' action='miCloseArmy'/><separator/><menuitem name='miReloadFiles' action='miReloadFiles'/><separator/><menuitem name='miExit' action='miExit'/></menu><menu name='menuEdit' action='menuEdit'><menuitem name='miUndo' action='miUndo'/><menuitem name='miRedo' action='miRedo'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/><menuitem name='miDebugInformation' action='miDebugInformation'/></menu></menubar></ui>");
             this.menubar1 = ((Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
             this.menubar1.Name = "menubar1";
             this.vbox1.Add(this.menubar1);
@@ -231,7 +224,6 @@
             this.miSaveArmy.Activated += new System.EventHandler(this.OnSaveArmyActivated);
             this.miSaveArmyAs.Activated += new System.EventHandler(this.OnSaveArmyAsActivated);
             this.miCloseArmy.Activated += new System.EventHandler(this.OnCloseArmyActivated);
-            this.miChangeGameSystem.Activated += new System.EventHandler(this.OnChangeGameSystemActivated);
             this.miReloadFiles.Activated += new System.EventHandler(this.OnReloadFilesActivated);
             this.miExit.Activated += new System.EventHandler(this.OnExitActivated);
             this.newArmyButton.Activated += new System.EventHandler(this.newTBButtonActivated);
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs	Sat Jan 16 11:07:15 2010 +0000
+++ b/gtk-gui/IBBoard.WarFoundry.GTK.FrmNewArmy.cs	Sat Jan 16 16:36:12 2010 +0000
@@ -29,6 +29,10 @@
         
         private Gtk.Label label3;
         
+        private Gtk.Label label4;
+        
+        private Gtk.ComboBoxEntry systemCombo;
+        
         private Gtk.Entry txtArmyName;
         
         private Gtk.Button bttnCancel;
@@ -52,7 +56,7 @@
             w1.Name = "dialog_VBox";
             w1.BorderWidth = ((uint)(2));
             // Container child dialog_VBox.Gtk.Box+BoxChild
-            this.table1 = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
+            this.table1 = new Gtk.Table(((uint)(4)), ((uint)(2)), false);
             this.table1.Name = "table1";
             this.table1.RowSpacing = ((uint)(6));
             this.table1.ColumnSpacing = ((uint)(6));
@@ -70,8 +74,11 @@
             this.GtkScrolledWindow.Add(this.lstRaces);
             this.table1.Add(this.GtkScrolledWindow);
             Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.GtkScrolledWindow]));
+            w3.TopAttach = ((uint)(1));
+            w3.BottomAttach = ((uint)(2));
             w3.LeftAttach = ((uint)(1));
             w3.RightAttach = ((uint)(2));
+            w3.XOptions = ((Gtk.AttachOptions)(4));
             w3.YOptions = ((Gtk.AttachOptions)(4));
             // Container child table1.Gtk.Table+TableChild
             this.hbox2 = new Gtk.HBox();
@@ -92,10 +99,11 @@
             w4.Fill = false;
             this.table1.Add(this.hbox2);
             Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.hbox2]));
-            w5.TopAttach = ((uint)(2));
-            w5.BottomAttach = ((uint)(3));
+            w5.TopAttach = ((uint)(3));
+            w5.BottomAttach = ((uint)(4));
             w5.LeftAttach = ((uint)(1));
             w5.RightAttach = ((uint)(2));
+            w5.XOptions = ((Gtk.AttachOptions)(4));
             w5.YOptions = ((Gtk.AttachOptions)(4));
             // Container child table1.Gtk.Table+TableChild
             this.label1 = new Gtk.Label();
@@ -103,6 +111,8 @@
             this.label1.LabelProp = Mono.Unix.Catalog.GetString("Race");
             this.table1.Add(this.label1);
             Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
+            w6.TopAttach = ((uint)(1));
+            w6.BottomAttach = ((uint)(2));
             w6.XOptions = ((Gtk.AttachOptions)(4));
             w6.YOptions = ((Gtk.AttachOptions)(4));
             // Container child table1.Gtk.Table+TableChild
@@ -111,8 +121,8 @@
             this.label2.LabelProp = Mono.Unix.Catalog.GetString("Army name");
             this.table1.Add(this.label2);
             Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
-            w7.TopAttach = ((uint)(1));
-            w7.BottomAttach = ((uint)(2));
+            w7.TopAttach = ((uint)(2));
+            w7.BottomAttach = ((uint)(3));
             w7.XOptions = ((Gtk.AttachOptions)(4));
             w7.YOptions = ((Gtk.AttachOptions)(4));
             // Container child table1.Gtk.Table+TableChild
@@ -121,37 +131,54 @@
             this.label3.LabelProp = Mono.Unix.Catalog.GetString("Points value");
             this.table1.Add(this.label3);
             Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
-            w8.TopAttach = ((uint)(2));
-            w8.BottomAttach = ((uint)(3));
+            w8.TopAttach = ((uint)(3));
+            w8.BottomAttach = ((uint)(4));
             w8.XOptions = ((Gtk.AttachOptions)(4));
             w8.YOptions = ((Gtk.AttachOptions)(4));
             // Container child table1.Gtk.Table+TableChild
+            this.label4 = new Gtk.Label();
+            this.label4.Name = "label4";
+            this.label4.LabelProp = Mono.Unix.Catalog.GetString("game system");
+            this.table1.Add(this.label4);
+            Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
+            w9.XOptions = ((Gtk.AttachOptions)(4));
+            w9.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table1.Gtk.Table+TableChild
+            this.systemCombo = Gtk.ComboBoxEntry.NewText();
+            this.systemCombo.Name = "systemCombo";
+            this.table1.Add(this.systemCombo);
+            Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table1[this.systemCombo]));
+            w10.LeftAttach = ((uint)(1));
+            w10.RightAttach = ((uint)(2));
+            w10.YOptions = ((Gtk.AttachOptions)(4));
+            // Container child table1.Gtk.Table+TableChild
             this.txtArmyName = new Gtk.Entry();
             this.txtArmyName.CanFocus = true;
             this.txtArmyName.Name = "txtArmyName";
             this.txtArmyName.IsEditable = true;
             this.txtArmyName.InvisibleChar = '•';
             this.table1.Add(this.txtArmyName);
-            Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table1[this.txtArmyName]));
-            w9.TopAttach = ((uint)(1));
-            w9.BottomAttach = ((uint)(2));
-            w9.LeftAttach = ((uint)(1));
-            w9.RightAttach = ((uint)(2));
-            w9.YOptions = ((Gtk.AttachOptions)(4));
+            Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table1[this.txtArmyName]));
+            w11.TopAttach = ((uint)(2));
+            w11.BottomAttach = ((uint)(3));
+            w11.LeftAttach = ((uint)(1));
+            w11.RightAttach = ((uint)(2));
+            w11.XOptions = ((Gtk.AttachOptions)(4));
+            w11.YOptions = ((Gtk.AttachOptions)(4));
             w1.Add(this.table1);
-            Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w1[this.table1]));
-            w10.Position = 0;
-            w10.Expand = false;
-            w10.Fill = false;
-            w10.Padding = ((uint)(6));
+            Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(w1[this.table1]));
+            w12.Position = 0;
+            w12.Expand = false;
+            w12.Fill = false;
+            w12.Padding = ((uint)(6));
             // Internal child IBBoard.WarFoundry.GTK.FrmNewArmy.ActionArea
-            Gtk.HButtonBox w11 = this.ActionArea;
-            w11.CanFocus = true;
-            w11.Events = ((Gdk.EventMask)(256));
-            w11.Name = "WarFoundrySharp.FrmNewArmy_ActionArea";
-            w11.Spacing = 6;
-            w11.BorderWidth = ((uint)(5));
-            w11.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
+            Gtk.HButtonBox w13 = this.ActionArea;
+            w13.CanFocus = true;
+            w13.Events = ((Gdk.EventMask)(256));
+            w13.Name = "WarFoundrySharp.FrmNewArmy_ActionArea";
+            w13.Spacing = 6;
+            w13.BorderWidth = ((uint)(5));
+            w13.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
             // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild
             this.bttnCancel = new Gtk.Button();
             this.bttnCancel.CanFocus = true;
@@ -160,9 +187,9 @@
             this.bttnCancel.UseUnderline = true;
             this.bttnCancel.Label = "gtk-cancel";
             this.AddActionWidget(this.bttnCancel, -6);
-            Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.bttnCancel]));
-            w12.Expand = false;
-            w12.Fill = false;
+            Gtk.ButtonBox.ButtonBoxChild w14 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCancel]));
+            w14.Expand = false;
+            w14.Fill = false;
             // Container child WarFoundrySharp.FrmNewArmy_ActionArea.Gtk.ButtonBox+ButtonBoxChild
             this.bttnCreate = new Gtk.Button();
             this.bttnCreate.Sensitive = false;
@@ -171,33 +198,34 @@
             this.bttnCreate.Name = "bttnCreate";
             this.bttnCreate.UseUnderline = true;
             // Container child bttnCreate.Gtk.Container+ContainerChild
-            Gtk.Alignment w13 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
+            Gtk.Alignment w15 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
             // Container child GtkAlignment.Gtk.Container+ContainerChild
-            Gtk.HBox w14 = new Gtk.HBox();
-            w14.Spacing = 2;
+            Gtk.HBox w16 = new Gtk.HBox();
+            w16.Spacing = 2;
             // Container child GtkHBox.Gtk.Container+ContainerChild
-            Gtk.Image w15 = new Gtk.Image();
-            w15.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-ok", Gtk.IconSize.Menu, 16);
-            w14.Add(w15);
+            Gtk.Image w17 = new Gtk.Image();
+            w17.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-ok", Gtk.IconSize.Menu, 16);
+            w16.Add(w17);
             // Container child GtkHBox.Gtk.Container+ContainerChild
-            Gtk.Label w17 = new Gtk.Label();
-            w17.LabelProp = Mono.Unix.Catalog.GetString("C_reate");
-            w17.UseUnderline = true;
-            w14.Add(w17);
-            w13.Add(w14);
-            this.bttnCreate.Add(w13);
+            Gtk.Label w19 = new Gtk.Label();
+            w19.LabelProp = Mono.Unix.Catalog.GetString("C_reate");
+            w19.UseUnderline = true;
+            w16.Add(w19);
+            w15.Add(w16);
+            this.bttnCreate.Add(w15);
             this.AddActionWidget(this.bttnCreate, -5);
-            Gtk.ButtonBox.ButtonBoxChild w21 = ((Gtk.ButtonBox.ButtonBoxChild)(w11[this.bttnCreate]));
-            w21.Position = 1;
-            w21.Expand = false;
-            w21.Fill = false;
+            Gtk.ButtonBox.ButtonBoxChild w23 = ((Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCreate]));
+            w23.Position = 1;
+            w23.Expand = false;
+            w23.Fill = false;
             if ((this.Child != null)) {
                 this.Child.ShowAll();
             }
-            this.DefaultWidth = 400;
-            this.DefaultHeight = 322;
+            this.DefaultWidth = 370;
+            this.DefaultHeight = 348;
             this.Show();
             this.txtArmyName.Changed += new System.EventHandler(this.OnTextChanged);
+            this.systemCombo.Changed += new System.EventHandler(this.OnSystemComboChanged);
             this.sbPointsValue.ChangeValue += new Gtk.ChangeValueHandler(this.OnSpinChangeValue);
             this.sbPointsValue.ValueChanged += new System.EventHandler(this.OnSpinValueChanged);
             this.sbPointsValue.Changed += new System.EventHandler(this.OnSpinValueChanged);
--- a/gtk-gui/gui.stetic	Sat Jan 16 11:07:15 2010 +0000
+++ b/gtk-gui/gui.stetic	Sat Jan 16 16:36:12 2010 +0000
@@ -18,7 +18,6 @@
       <action id="miCreateArmy">
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">Create army</property>
-        <property name="Sensitive">False</property>
         <property name="ShortLabel" translatable="yes">Create army</property>
         <property name="StockId">gtk-new</property>
         <signal name="Activated" handler="OnCreateArmyActivated" />
@@ -54,12 +53,6 @@
         <property name="StockId">gtk-close</property>
         <signal name="Activated" handler="OnCloseArmyActivated" />
       </action>
-      <action id="miChangeGameSystem">
-        <property name="Type">Action</property>
-        <property name="Label" translatable="yes">Change game system</property>
-        <property name="ShortLabel" translatable="yes">Change game system</property>
-        <signal name="Activated" handler="OnChangeGameSystemActivated" after="yes" />
-      </action>
       <action id="miReloadFiles">
         <property name="Type">Action</property>
         <property name="Label" translatable="yes">Reload files</property>
@@ -113,7 +106,6 @@
       <action id="newArmyButton">
         <property name="Type">Action</property>
         <property name="Label" translatable="yes" />
-        <property name="Sensitive">False</property>
         <property name="StockId">gtk-new</property>
         <signal name="Activated" handler="newTBButtonActivated" />
       </action>
@@ -187,8 +179,6 @@
                 </node>
                 <node type="Menuitem" action="miCloseArmy" />
                 <node type="Separator" />
-                <node type="Menuitem" action="miChangeGameSystem" />
-                <node type="Separator" />
                 <node type="Menuitem" action="miReloadFiles" />
                 <node type="Separator" />
                 <node type="Menuitem" action="miExit" />
@@ -216,6 +206,7 @@
             <property name="HeightRequest">36</property>
             <property name="ShowArrow">False</property>
             <property name="ButtonStyle">Icons</property>
+            <property name="IconSize">LargeToolbar</property>
             <node name="toolbar" type="Toolbar">
               <node type="Toolitem" action="newArmyButton" />
               <node type="Toolitem" action="openArmyButton" />
@@ -284,7 +275,7 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GTK.FrmNewArmy" design-size="400 322">
+  <widget class="Gtk.Dialog" id="IBBoard.WarFoundry.GTK.FrmNewArmy" design-size="370 348">
     <property name="MemberName" />
     <property name="Events">ButtonPressMask</property>
     <property name="Title" translatable="yes">Create new army</property>
@@ -303,7 +294,7 @@
         <child>
           <widget class="Gtk.Table" id="table1">
             <property name="MemberName" />
-            <property name="NRows">3</property>
+            <property name="NRows">4</property>
             <property name="NColumns">2</property>
             <property name="RowSpacing">6</property>
             <property name="ColumnSpacing">6</property>
@@ -323,11 +314,14 @@
                 </child>
               </widget>
               <packing>
+                <property name="TopAttach">1</property>
+                <property name="BottomAttach">2</property>
                 <property name="LeftAttach">1</property>
                 <property name="RightAttach">2</property>
                 <property name="AutoSize">True</property>
+                <property name="XOptions">Fill</property>
                 <property name="YOptions">Fill</property>
-                <property name="XExpand">True</property>
+                <property name="XExpand">False</property>
                 <property name="XFill">True</property>
                 <property name="XShrink">False</property>
                 <property name="YExpand">False</property>
@@ -365,13 +359,14 @@
                 </child>
               </widget>
               <packing>
-                <property name="TopAttach">2</property>
-                <property name="BottomAttach">3</property>
+                <property name="TopAttach">3</property>
+                <property name="BottomAttach">4</property>
                 <property name="LeftAttach">1</property>
                 <property name="RightAttach">2</property>
                 <property name="AutoSize">True</property>
+                <property name="XOptions">Fill</property>
                 <property name="YOptions">Fill</property>
-                <property name="XExpand">True</property>
+                <property name="XExpand">False</property>
                 <property name="XFill">True</property>
                 <property name="XShrink">False</property>
                 <property name="YExpand">False</property>
@@ -385,6 +380,8 @@
                 <property name="LabelProp" translatable="yes">Race</property>
               </widget>
               <packing>
+                <property name="TopAttach">1</property>
+                <property name="BottomAttach">2</property>
                 <property name="AutoSize">True</property>
                 <property name="XOptions">Fill</property>
                 <property name="YOptions">Fill</property>
@@ -402,8 +399,8 @@
                 <property name="LabelProp" translatable="yes">Army name</property>
               </widget>
               <packing>
-                <property name="TopAttach">1</property>
-                <property name="BottomAttach">2</property>
+                <property name="TopAttach">2</property>
+                <property name="BottomAttach">3</property>
                 <property name="AutoSize">True</property>
                 <property name="XOptions">Fill</property>
                 <property name="YOptions">Fill</property>
@@ -421,8 +418,8 @@
                 <property name="LabelProp" translatable="yes">Points value</property>
               </widget>
               <packing>
-                <property name="TopAttach">2</property>
-                <property name="BottomAttach">3</property>
+                <property name="TopAttach">3</property>
+                <property name="BottomAttach">4</property>
                 <property name="AutoSize">True</property>
                 <property name="XOptions">Fill</property>
                 <property name="YOptions">Fill</property>
@@ -435,6 +432,43 @@
               </packing>
             </child>
             <child>
+              <widget class="Gtk.Label" id="label4">
+                <property name="MemberName" />
+                <property name="LabelProp" translatable="yes">game system</property>
+              </widget>
+              <packing>
+                <property name="AutoSize">True</property>
+                <property name="XOptions">Fill</property>
+                <property name="YOptions">Fill</property>
+                <property name="XExpand">False</property>
+                <property name="XFill">True</property>
+                <property name="XShrink">False</property>
+                <property name="YExpand">False</property>
+                <property name="YFill">True</property>
+                <property name="YShrink">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.ComboBoxEntry" id="systemCombo">
+                <property name="MemberName" />
+                <property name="IsTextCombo">True</property>
+                <property name="Items" translatable="yes" />
+                <signal name="Changed" handler="OnSystemComboChanged" />
+              </widget>
+              <packing>
+                <property name="LeftAttach">1</property>
+                <property name="RightAttach">2</property>
+                <property name="AutoSize">False</property>
+                <property name="YOptions">Fill</property>
+                <property name="XExpand">True</property>
+                <property name="XFill">True</property>
+                <property name="XShrink">False</property>
+                <property name="YExpand">False</property>
+                <property name="YFill">True</property>
+                <property name="YShrink">False</property>
+              </packing>
+            </child>
+            <child>
               <widget class="Gtk.Entry" id="txtArmyName">
                 <property name="MemberName" />
                 <property name="CanFocus">True</property>
@@ -443,13 +477,14 @@
                 <signal name="Changed" handler="OnTextChanged" />
               </widget>
               <packing>
-                <property name="TopAttach">1</property>
-                <property name="BottomAttach">2</property>
+                <property name="TopAttach">2</property>
+                <property name="BottomAttach">3</property>
                 <property name="LeftAttach">1</property>
                 <property name="RightAttach">2</property>
                 <property name="AutoSize">True</property>
+                <property name="XOptions">Fill</property>
                 <property name="YOptions">Fill</property>
-                <property name="XExpand">True</property>
+                <property name="XExpand">False</property>
                 <property name="XFill">True</property>
                 <property name="XShrink">False</property>
                 <property name="YExpand">False</property>