Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
diff gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs @ 28:9440eef124b0
Closes #69: Add "export" UI
* Add base menu for exports (will be populated automatically once exports are plugins)
* Add menu item for "Basic HTML"
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Tue, 01 Sep 2009 19:10:13 +0000 |
parents | 01ddadfa9653 |
children | 2e5448a662b6 |
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs Fri Aug 28 18:52:34 2009 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs Tue Sep 01 19:10:13 2009 +0000 @@ -59,6 +59,10 @@ private Gtk.Action add; + private Gtk.Action miExportArmy; + + private Gtk.Action miExportAsBasicHtml; + private Gtk.VBox vbox1; private Gtk.MenuBar menubar1; @@ -148,6 +152,12 @@ w1.Add(this.goDown, null); this.add = new Gtk.Action("add", null, null, "gtk-add"); w1.Add(this.add, null); + this.miExportArmy = new Gtk.Action("miExportArmy", Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert"); + this.miExportArmy.ShortLabel = Mono.Unix.Catalog.GetString("Export army"); + w1.Add(this.miExportArmy, null); + this.miExportAsBasicHtml = new Gtk.Action("miExportAsBasicHtml", Mono.Unix.Catalog.GetString("Basic HTML"), null, null); + this.miExportAsBasicHtml.ShortLabel = Mono.Unix.Catalog.GetString("Basic HTML"); + w1.Add(this.miExportAsBasicHtml, null); this.UIManager.InsertActionGroup(w1, 0); this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "IBBoard.WarFoundry.GTK.FrmMainWindow"; @@ -157,7 +167,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'/><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='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.menubar1 = ((Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox1.Add(this.menubar1); @@ -227,6 +237,7 @@ this.saveArmyButton.Activated += new System.EventHandler(this.saveTBButtonActivated); this.undoActionButton.Activated += new System.EventHandler(this.undoTBButtonActivated); this.redoActionButton.Activated += new System.EventHandler(this.redoTBButtonActivated); + this.miExportAsBasicHtml.Activated += new System.EventHandler(this.OnMiExportAsBasicHtmlActivated); this.treeUnits.RowActivated += new Gtk.RowActivatedHandler(this.ArmyRowActivated); } }