Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
diff gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs @ 139:d4b726cec12c
Fixes #326: Make army names and sizes modifiable after creation
* Only invoke command on change
* Make use of new "generate default name" function for consistency
* Commit missed auto-generated code file
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 12 Oct 2011 20:36:02 +0100 |
parents | 560eb34acd17 |
children | 2b9fabd65309 |
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Tue Oct 11 21:05:10 2011 +0100 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Wed Oct 12 20:36:02 2011 +0100 @@ -30,6 +30,7 @@ private global::Gtk.Action miExportArmyAsBasicHTML; private global::Gtk.Action miPreferences; private global::Gtk.Action miExportArmyAsTransformedXml; + private global::Gtk.Action miEditArmy; private global::Gtk.VBox vbox1; private global::Gtk.MenuBar menubar1; private global::Gtk.Toolbar toolbar; @@ -122,6 +123,10 @@ this.miExportArmyAsTransformedXml = new global::Gtk.Action ("miExportArmyAsTransformedXml", global::Mono.Unix.Catalog.GetString ("transformed xml"), null, null); this.miExportArmyAsTransformedXml.ShortLabel = global::Mono.Unix.Catalog.GetString ("transformed xml"); w1.Add (this.miExportArmyAsTransformedXml, null); + this.miEditArmy = new global::Gtk.Action ("miEditArmy", global::Mono.Unix.Catalog.GetString ("_edit army"), null, "gtk-edit"); + this.miEditArmy.Sensitive = false; + this.miEditArmy.ShortLabel = global::Mono.Unix.Catalog.GetString ("_edit army"); + w1.Add (this.miEditArmy, null); this.UIManager.InsertActionGroup (w1, 0); this.AddAccelGroup (this.UIManager.AccelGroup); this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmMainWindow"; @@ -131,7 +136,7 @@ this.vbox1 = new global::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='miNewArmy' action='miNewArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmyAs' action='miExportArmyAs'><menuitem name='miExportArmyAsBasicHTML' action='miExportArmyAsBasicHTML'/><menuitem name='miExportArmyAsTransformedXml' action='miExportArmyAsTransformedXml'/></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'/><separator/><menuitem name='miPreferences' action='miPreferences'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/></menu></menubar></ui>"); + this.UIManager.AddUiFromString ("<ui><menubar name='menubar1'><menu name='menuFile' action='menuFile'><menuitem name='miNewArmy' action='miNewArmy'/><menuitem name='miOpenArmy' action='miOpenArmy'/><menuitem name='miSaveArmy' action='miSaveArmy'/><menuitem name='miSaveArmyAs' action='miSaveArmyAs'/><menu name='miExportArmyAs' action='miExportArmyAs'><menuitem name='miExportArmyAsBasicHTML' action='miExportArmyAsBasicHTML'/><menuitem name='miExportArmyAsTransformedXml' action='miExportArmyAsTransformedXml'/></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'/><separator/><menuitem name='miEditArmy' action='miEditArmy'/><separator/><menuitem name='miPreferences' action='miPreferences'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/></menu></menubar></ui>"); this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox1.Add (this.menubar1); @@ -217,6 +222,7 @@ this.miExportArmyAsBasicHTML.Activated += new global::System.EventHandler (this.OnMiExportAsBasicHtmlActivated); 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.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler (this.ArmyRowActivated); this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler (this.OnTreeUnitsPopupMenu); this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler (this.UnitTreeButtonPressed);