comparison gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs @ 82:fb16ca1cb52b

Re #308: Make GTK# UI translatable * Match button names to WinForms for consistency * Translate army column title
author IBBoard <dev@ibboard.co.uk>
date Tue, 28 Dec 2010 20:20:16 +0000
parents 3ff8e10de45a
children ea4069bbe6e9
comparison
equal deleted inserted replaced
81:3ff8e10de45a 82:fb16ca1cb52b
9 private global::Gtk.Action miNewArmy; 9 private global::Gtk.Action miNewArmy;
10 private global::Gtk.Action miOpenArmy; 10 private global::Gtk.Action miOpenArmy;
11 private global::Gtk.Action miSaveArmy; 11 private global::Gtk.Action miSaveArmy;
12 private global::Gtk.Action miSaveArmyAs; 12 private global::Gtk.Action miSaveArmyAs;
13 private global::Gtk.Action miCloseArmy; 13 private global::Gtk.Action miCloseArmy;
14 private global::Gtk.Action refreshAction; 14 private global::Gtk.Action miReloadFiles;
15 private global::Gtk.Action miExit; 15 private global::Gtk.Action miExit;
16 private global::Gtk.Action menuEdit; 16 private global::Gtk.Action menuEdit;
17 private global::Gtk.Action miUndo; 17 private global::Gtk.Action miUndo;
18 private global::Gtk.Action miRedo; 18 private global::Gtk.Action miRedo;
19 private global::Gtk.Action menuHelp; 19 private global::Gtk.Action menuHelp;
20 private global::Gtk.Action miAbout; 20 private global::Gtk.Action miAbout;
21 private global::Gtk.Action miDebugInformation; 21 private global::Gtk.Action miDebugInformation;
22 private global::Gtk.Action newArmyButton; 22 private global::Gtk.Action bttnNewArmy;
23 private global::Gtk.Action openArmyButton; 23 private global::Gtk.Action bttnOpenArmy;
24 private global::Gtk.Action saveArmyButton; 24 private global::Gtk.Action bttnSaveArmy;
25 private global::Gtk.Action undoActionButton; 25 private global::Gtk.Action bttnUndo;
26 private global::Gtk.Action redoActionButton; 26 private global::Gtk.Action bttnRedo;
27 private global::Gtk.Action goDown; 27 private global::Gtk.Action goDown;
28 private global::Gtk.Action add; 28 private global::Gtk.Action add;
29 private global::Gtk.Action miExportArmyAs; 29 private global::Gtk.Action miExportArmyAs;
30 private global::Gtk.Action miExportAsBasicHtml; 30 private global::Gtk.Action miExportAsBasicHtml;
31 private global::Gtk.VBox vbox1; 31 private global::Gtk.VBox vbox1;
61 w1.Add(this.miSaveArmyAs, null); 61 w1.Add(this.miSaveArmyAs, null);
62 this.miCloseArmy = new global::Gtk.Action("miCloseArmy", global::Mono.Unix.Catalog.GetString("Close army"), null, "gtk-close"); 62 this.miCloseArmy = new global::Gtk.Action("miCloseArmy", global::Mono.Unix.Catalog.GetString("Close army"), null, "gtk-close");
63 this.miCloseArmy.Sensitive = false; 63 this.miCloseArmy.Sensitive = false;
64 this.miCloseArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Close army"); 64 this.miCloseArmy.ShortLabel = global::Mono.Unix.Catalog.GetString("Close army");
65 w1.Add(this.miCloseArmy, null); 65 w1.Add(this.miCloseArmy, null);
66 this.refreshAction = new global::Gtk.Action("refreshAction", global::Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh"); 66 this.miReloadFiles = new global::Gtk.Action("miReloadFiles", global::Mono.Unix.Catalog.GetString("Reload files"), null, "gtk-refresh");
67 this.refreshAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Reload files"); 67 this.miReloadFiles.ShortLabel = global::Mono.Unix.Catalog.GetString("Reload files");
68 w1.Add(this.refreshAction, null); 68 w1.Add(this.miReloadFiles, null);
69 this.miExit = new global::Gtk.Action("miExit", global::Mono.Unix.Catalog.GetString("Exit"), null, "gtk-quit"); 69 this.miExit = new global::Gtk.Action("miExit", global::Mono.Unix.Catalog.GetString("Exit"), null, "gtk-quit");
70 this.miExit.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit"); 70 this.miExit.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit");
71 w1.Add(this.miExit, null); 71 w1.Add(this.miExit, null);
72 this.menuEdit = new global::Gtk.Action("menuEdit", global::Mono.Unix.Catalog.GetString("Edit"), null, null); 72 this.menuEdit = new global::Gtk.Action("menuEdit", global::Mono.Unix.Catalog.GetString("Edit"), null, null);
73 this.menuEdit.ShortLabel = global::Mono.Unix.Catalog.GetString("Edit"); 73 this.menuEdit.ShortLabel = global::Mono.Unix.Catalog.GetString("Edit");
87 this.miAbout.ShortLabel = global::Mono.Unix.Catalog.GetString("About"); 87 this.miAbout.ShortLabel = global::Mono.Unix.Catalog.GetString("About");
88 w1.Add(this.miAbout, null); 88 w1.Add(this.miAbout, null);
89 this.miDebugInformation = new global::Gtk.Action("miDebugInformation", global::Mono.Unix.Catalog.GetString("Debug Information"), null, null); 89 this.miDebugInformation = new global::Gtk.Action("miDebugInformation", global::Mono.Unix.Catalog.GetString("Debug Information"), null, null);
90 this.miDebugInformation.ShortLabel = global::Mono.Unix.Catalog.GetString("Debug Information"); 90 this.miDebugInformation.ShortLabel = global::Mono.Unix.Catalog.GetString("Debug Information");
91 w1.Add(this.miDebugInformation, null); 91 w1.Add(this.miDebugInformation, null);
92 this.newArmyButton = new global::Gtk.Action("newArmyButton", null, null, "gtk-new"); 92 this.bttnNewArmy = new global::Gtk.Action("bttnNewArmy", null, null, "gtk-new");
93 w1.Add(this.newArmyButton, null); 93 w1.Add(this.bttnNewArmy, null);
94 this.openArmyButton = new global::Gtk.Action("openArmyButton", null, null, "gtk-open"); 94 this.bttnOpenArmy = new global::Gtk.Action("bttnOpenArmy", null, null, "gtk-open");
95 w1.Add(this.openArmyButton, null); 95 w1.Add(this.bttnOpenArmy, null);
96 this.saveArmyButton = new global::Gtk.Action("saveArmyButton", null, null, "gtk-save"); 96 this.bttnSaveArmy = new global::Gtk.Action("bttnSaveArmy", null, null, "gtk-save");
97 this.saveArmyButton.Sensitive = false; 97 this.bttnSaveArmy.Sensitive = false;
98 w1.Add(this.saveArmyButton, null); 98 w1.Add(this.bttnSaveArmy, null);
99 this.undoActionButton = new global::Gtk.Action("undoActionButton", null, null, "gtk-undo"); 99 this.bttnUndo = new global::Gtk.Action("bttnUndo", null, null, "gtk-undo");
100 this.undoActionButton.Sensitive = false; 100 this.bttnUndo.Sensitive = false;
101 w1.Add(this.undoActionButton, null); 101 w1.Add(this.bttnUndo, null);
102 this.redoActionButton = new global::Gtk.Action("redoActionButton", null, null, "gtk-redo"); 102 this.bttnRedo = new global::Gtk.Action("bttnRedo", null, null, "gtk-redo");
103 this.redoActionButton.Sensitive = false; 103 this.bttnRedo.Sensitive = false;
104 w1.Add(this.redoActionButton, null); 104 w1.Add(this.bttnRedo, null);
105 this.goDown = new global::Gtk.Action("goDown", null, null, null); 105 this.goDown = new global::Gtk.Action("goDown", null, null, null);
106 w1.Add(this.goDown, null); 106 w1.Add(this.goDown, null);
107 this.add = new global::Gtk.Action("add", null, null, "gtk-add"); 107 this.add = new global::Gtk.Action("add", null, null, "gtk-add");
108 w1.Add(this.add, null); 108 w1.Add(this.add, null);
109 this.miExportArmyAs = new global::Gtk.Action("miExportArmyAs", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert"); 109 this.miExportArmyAs = new global::Gtk.Action("miExportArmyAs", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert");
120 this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico"); 120 this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico");
121 // Container child IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.Gtk.Container+ContainerChild 121 // Container child IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.Gtk.Container+ContainerChild
122 this.vbox1 = new global::Gtk.VBox(); 122 this.vbox1 = new global::Gtk.VBox();
123 this.vbox1.Name = "vbox1"; 123 this.vbox1.Name = "vbox1";
124 // Container child vbox1.Gtk.Box+BoxChild 124 // Container child vbox1.Gtk.Box+BoxChild
125 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='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'/></menu></menubar></ui>"); 125 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='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'/></menu></menubar></ui>");
126 this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); 126 this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
127 this.menubar1.Name = "menubar1"; 127 this.menubar1.Name = "menubar1";
128 this.vbox1.Add(this.menubar1); 128 this.vbox1.Add(this.menubar1);
129 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); 129 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
130 w2.Position = 0; 130 w2.Position = 0;
131 w2.Expand = false; 131 w2.Expand = false;
132 w2.Fill = false; 132 w2.Fill = false;
133 // Container child vbox1.Gtk.Box+BoxChild 133 // Container child vbox1.Gtk.Box+BoxChild
134 this.UIManager.AddUiFromString("<ui><toolbar name='toolbar'><toolitem name='newArmyButton' action='newArmyButton'/><toolitem name='openArmyButton' action='openArmyButton'/><toolitem name='saveArmyButton' action='saveArmyButton'/><separator/><toolitem name='undoActionButton' action='undoActionButton'/><toolitem name='redoActionButton' action='redoActionButton'/><separator/></toolbar></ui>"); 134 this.UIManager.AddUiFromString("<ui><toolbar name='toolbar'><toolitem name='bttnNewArmy' action='bttnNewArmy'/><toolitem name='bttnOpenArmy' action='bttnOpenArmy'/><toolitem name='bttnSaveArmy' action='bttnSaveArmy'/><separator/><toolitem name='bttnUndo' action='bttnUndo'/><toolitem name='bttnRedo' action='bttnRedo'/><separator/></toolbar></ui>");
135 this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar"))); 135 this.toolbar = ((global::Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar")));
136 this.toolbar.HeightRequest = 36; 136 this.toolbar.HeightRequest = 36;
137 this.toolbar.Name = "toolbar"; 137 this.toolbar.Name = "toolbar";
138 this.toolbar.ShowArrow = false; 138 this.toolbar.ShowArrow = false;
139 this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0)); 139 this.toolbar.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
186 this.miNewArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated); 186 this.miNewArmy.Activated += new global::System.EventHandler(this.OnCreateArmyActivated);
187 this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated); 187 this.miOpenArmy.Activated += new global::System.EventHandler(this.OnOpenArmyActivated);
188 this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated); 188 this.miSaveArmy.Activated += new global::System.EventHandler(this.OnSaveArmyActivated);
189 this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated); 189 this.miSaveArmyAs.Activated += new global::System.EventHandler(this.OnSaveArmyAsActivated);
190 this.miCloseArmy.Activated += new global::System.EventHandler(this.OnCloseArmyActivated); 190 this.miCloseArmy.Activated += new global::System.EventHandler(this.OnCloseArmyActivated);
191 this.refreshAction.Activated += new global::System.EventHandler(this.OnReloadFilesActivated); 191 this.miReloadFiles.Activated += new global::System.EventHandler(this.OnReloadFilesActivated);
192 this.miExit.Activated += new global::System.EventHandler(this.OnExitActivated); 192 this.miExit.Activated += new global::System.EventHandler(this.OnExitActivated);
193 this.miAbout.Activated += new global::System.EventHandler(this.HelpAboutActivated); 193 this.miAbout.Activated += new global::System.EventHandler(this.HelpAboutActivated);
194 this.newArmyButton.Activated += new global::System.EventHandler(this.newTBButtonActivated); 194 this.bttnNewArmy.Activated += new global::System.EventHandler(this.newTBButtonActivated);
195 this.openArmyButton.Activated += new global::System.EventHandler(this.openTBButtonActivated); 195 this.bttnOpenArmy.Activated += new global::System.EventHandler(this.openTBButtonActivated);
196 this.saveArmyButton.Activated += new global::System.EventHandler(this.saveTBButtonActivated); 196 this.bttnSaveArmy.Activated += new global::System.EventHandler(this.saveTBButtonActivated);
197 this.undoActionButton.Activated += new global::System.EventHandler(this.undoTBButtonActivated); 197 this.bttnUndo.Activated += new global::System.EventHandler(this.undoTBButtonActivated);
198 this.redoActionButton.Activated += new global::System.EventHandler(this.redoTBButtonActivated); 198 this.bttnRedo.Activated += new global::System.EventHandler(this.redoTBButtonActivated);
199 this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated); 199 this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated);
200 this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler(this.ArmyRowActivated); 200 this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler(this.ArmyRowActivated);
201 this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler(this.OnTreeUnitsPopupMenu); 201 this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler(this.OnTreeUnitsPopupMenu);
202 this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(this.UnitTreeButtonPressed); 202 this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(this.UnitTreeButtonPressed);
203 this.unitsNotebook.Removed += new global::Gtk.RemovedHandler(this.NotebookPageRemoved); 203 this.unitsNotebook.Removed += new global::Gtk.RemovedHandler(this.NotebookPageRemoved);