comparison gtk-gui/IBBoard.WarFoundry.GTK.FrmMainWindow.cs @ 44:44e6833bb41a

Re #145: Add UI to remove units from army * Fix the delay in right-click menu caused by out of sync selection Re #86: Complete initial GTK# UI * Make unit creation create a tab
author IBBoard <dev@ibboard.co.uk>
date Wed, 11 Aug 2010 19:43:20 +0000
parents 4e127ce8682f
children 5584860fb44b
comparison
equal deleted inserted replaced
43:4e127ce8682f 44:44e6833bb41a
16 16
17 private global::Gtk.Action miSaveArmyAs; 17 private global::Gtk.Action miSaveArmyAs;
18 18
19 private global::Gtk.Action miCloseArmy; 19 private global::Gtk.Action miCloseArmy;
20 20
21 private global::Gtk.Action miReloadFiles; 21 private global::Gtk.Action refreshAction;
22 22
23 private global::Gtk.Action miExit; 23 private global::Gtk.Action miExit;
24 24
25 private global::Gtk.Action menuEdit; 25 private global::Gtk.Action menuEdit;
26 26
91 w1.Add(this.miSaveArmyAs, null); 91 w1.Add(this.miSaveArmyAs, null);
92 this.miCloseArmy = new global::Gtk.Action("miCloseArmy", global::Mono.Unix.Catalog.GetString("Close army"), null, "gtk-close"); 92 this.miCloseArmy = new global::Gtk.Action("miCloseArmy", global::Mono.Unix.Catalog.GetString("Close army"), null, "gtk-close");
93 this.miCloseArmy.Sensitive = false; 93 this.miCloseArmy.Sensitive = false;
94 this.miCloseArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Close army"); 94 this.miCloseArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Close army");
95 w1.Add(this.miCloseArmy, null); 95 w1.Add(this.miCloseArmy, null);
96 this.miReloadFiles = new global::Gtk.Action("miReloadFiles", global::Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh"); 96 this.refreshAction = new global::Gtk.Action("refreshAction", global::Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh");
97 this.miReloadFiles.Sensitive = false; 97 this.refreshAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Reload files");
98 this.miReloadFiles.ShortLabel = global::Mono.Unix.Catalog.GetString("Reload files"); 98 w1.Add(this.refreshAction, null);
99 w1.Add(this.miReloadFiles, null);
100 this.miExit = new global::Gtk.Action("miExit", global::Mono.Unix.Catalog.GetString("Exit"), null, "gtk-quit"); 99 this.miExit = new global::Gtk.Action("miExit", global::Mono.Unix.Catalog.GetString("Exit"), null, "gtk-quit");
101 this.miExit.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit"); 100 this.miExit.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit");
102 w1.Add(this.miExit, null); 101 w1.Add(this.miExit, null);
103 this.menuEdit = new global::Gtk.Action("menuEdit", global::Mono.Unix.Catalog.GetString("Edit"), null, null); 102 this.menuEdit = new global::Gtk.Action("menuEdit", global::Mono.Unix.Catalog.GetString("Edit"), null, null);
104 this.menuEdit.ShortLabel = global::Mono.Unix.Catalog.GetString("Edit"); 103 this.menuEdit.ShortLabel = global::Mono.Unix.Catalog.GetString("Edit");
151 this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico"); 150 this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico");
152 // Container child IBBoard.WarFoundry.GTK.FrmMainWindow.Gtk.Container+ContainerChild 151 // Container child IBBoard.WarFoundry.GTK.FrmMainWindow.Gtk.Container+ContainerChild
153 this.vbox1 = new global::Gtk.VBox(); 152 this.vbox1 = new global::Gtk.VBox();
154 this.vbox1.Name = "vbox1"; 153 this.vbox1.Name = "vbox1";
155 // Container child vbox1.Gtk.Box+BoxChild 154 // Container child vbox1.Gtk.Box+BoxChild
156 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>"); 155 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='refreshAction' action='refreshAction'/><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>");
157 this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); 156 this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
158 this.menubar1.Name = "menubar1"; 157 this.menubar1.Name = "menubar1";
159 this.vbox1.Add(this.menubar1); 158 this.vbox1.Add(this.menubar1);
160 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); 159 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
161 w2.Position = 0; 160 w2.Position = 0;
216 this.miCreateArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated); 215 this.miCreateArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated);
217 this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated); 216 this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated);
218 this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated); 217 this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated);
219 this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated); 218 this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated);
220 this.miCloseArmy.Activated += new global::System.EventHandler(this.OnCloseArmyActivated); 219 this.miCloseArmy.Activated += new global::System.EventHandler(this.OnCloseArmyActivated);
221 this.miReloadFiles.Activated += new global::System.EventHandler(this.OnReloadFilesActivated); 220 this.refreshAction.Activated += new global::System.EventHandler(this.OnReloadFilesActivated);
222 this.miExit.Activated += new global::System.EventHandler(this.OnExitActivated); 221 this.miExit.Activated += new global::System.EventHandler(this.OnExitActivated);
223 this.newArmyButton.Activated += new global::System.EventHandler(this.newTBButtonActivated); 222 this.newArmyButton.Activated += new global::System.EventHandler(this.newTBButtonActivated);
224 this.openArmyButton.Activated += new global::System.EventHandler(this.openTBButtonActivated); 223 this.openArmyButton.Activated += new global::System.EventHandler(this.openTBButtonActivated);
225 this.saveArmyButton.Activated += new global::System.EventHandler(this.saveTBButtonActivated); 224 this.saveArmyButton.Activated += new global::System.EventHandler(this.saveTBButtonActivated);
226 this.undoActionButton.Activated += new global::System.EventHandler(this.undoTBButtonActivated); 225 this.undoActionButton.Activated += new global::System.EventHandler(this.undoTBButtonActivated);