comparison gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs @ 95:ea4069bbe6e9

Re #309: Add initial preference dialog with language support * Add first preference dialog * Add French translations (based on WinForms file) Re #308: Make GTK# UI translatable * Add some missing English translations (API strings)
author IBBoard <dev@ibboard.co.uk>
date Sat, 01 Jan 2011 20:55:07 +0000
parents fb16ca1cb52b
children 8777e4f64d8e
comparison
equal deleted inserted replaced
94:26e4525b49cf 95:ea4069bbe6e9
26 private global::Gtk.Action bttnRedo; 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.Action miPreferences;
31 private global::Gtk.VBox vbox1; 32 private global::Gtk.VBox vbox1;
32 private global::Gtk.MenuBar menubar1; 33 private global::Gtk.MenuBar menubar1;
33 private global::Gtk.Toolbar toolbar; 34 private global::Gtk.Toolbar toolbar;
34 private global::Gtk.HPaned hpaned2; 35 private global::Gtk.HPaned hpaned2;
35 private global::Gtk.TreeView treeUnits; 36 private global::Gtk.TreeView treeUnits;
106 w1.Add(this.goDown, null); 107 w1.Add(this.goDown, null);
107 this.add = new global::Gtk.Action("add", null, null, "gtk-add"); 108 this.add = new global::Gtk.Action("add", null, null, "gtk-add");
108 w1.Add(this.add, null); 109 w1.Add(this.add, null);
109 this.miExportArmyAs = new global::Gtk.Action("miExportArmyAs", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert"); 110 this.miExportArmyAs = new global::Gtk.Action("miExportArmyAs", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert");
110 this.miExportArmyAs.Sensitive = false; 111 this.miExportArmyAs.Sensitive = false;
111 this.miExportArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army"); 112 this.miExportArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army as...");
112 w1.Add(this.miExportArmyAs, null); 113 w1.Add(this.miExportArmyAs, null);
113 this.miExportAsBasicHtml = new global::Gtk.Action("miExportAsBasicHtml", global::Mono.Unix.Catalog.GetString("Basic HTML"), null, null); 114 this.miExportAsBasicHtml = new global::Gtk.Action("miExportAsBasicHtml", global::Mono.Unix.Catalog.GetString("Basic HTML"), null, null);
114 this.miExportAsBasicHtml.ShortLabel = global::Mono.Unix.Catalog.GetString("Basic HTML"); 115 this.miExportAsBasicHtml.ShortLabel = global::Mono.Unix.Catalog.GetString("Basic HTML");
115 w1.Add(this.miExportAsBasicHtml, null); 116 w1.Add(this.miExportAsBasicHtml, null);
117 this.miPreferences = new global::Gtk.Action("miPreferences", global::Mono.Unix.Catalog.GetString("preferences"), null, "gtk-preferences");
118 this.miPreferences.ShortLabel = global::Mono.Unix.Catalog.GetString("preferences");
119 w1.Add(this.miPreferences, null);
116 this.UIManager.InsertActionGroup(w1, 0); 120 this.UIManager.InsertActionGroup(w1, 0);
117 this.AddAccelGroup(this.UIManager.AccelGroup); 121 this.AddAccelGroup(this.UIManager.AccelGroup);
118 this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmMainWindow"; 122 this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmMainWindow";
119 this.Title = global::Mono.Unix.Catalog.GetString("MainWindow"); 123 this.Title = global::Mono.Unix.Catalog.GetString("MainWindow");
120 this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico"); 124 this.Icon = global::Gdk.Pixbuf.LoadFromResource("App.ico");
121 // Container child IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.Gtk.Container+ContainerChild 125 // Container child IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.Gtk.Container+ContainerChild
122 this.vbox1 = new global::Gtk.VBox(); 126 this.vbox1 = new global::Gtk.VBox();
123 this.vbox1.Name = "vbox1"; 127 this.vbox1.Name = "vbox1";
124 // Container child vbox1.Gtk.Box+BoxChild 128 // 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='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>"); 129 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'/><separator/><menuitem name='miPreferences' action='miPreferences'/></menu><menu name='menuHelp' action='menuHelp'><menuitem name='miAbout' action='miAbout'/></menu></menubar></ui>");
126 this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); 130 this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
127 this.menubar1.Name = "menubar1"; 131 this.menubar1.Name = "menubar1";
128 this.vbox1.Add(this.menubar1); 132 this.vbox1.Add(this.menubar1);
129 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1])); 133 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
130 w2.Position = 0; 134 w2.Position = 0;
195 this.bttnOpenArmy.Activated += new global::System.EventHandler(this.openTBButtonActivated); 199 this.bttnOpenArmy.Activated += new global::System.EventHandler(this.openTBButtonActivated);
196 this.bttnSaveArmy.Activated += new global::System.EventHandler(this.saveTBButtonActivated); 200 this.bttnSaveArmy.Activated += new global::System.EventHandler(this.saveTBButtonActivated);
197 this.bttnUndo.Activated += new global::System.EventHandler(this.undoTBButtonActivated); 201 this.bttnUndo.Activated += new global::System.EventHandler(this.undoTBButtonActivated);
198 this.bttnRedo.Activated += new global::System.EventHandler(this.redoTBButtonActivated); 202 this.bttnRedo.Activated += new global::System.EventHandler(this.redoTBButtonActivated);
199 this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated); 203 this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated);
204 this.miPreferences.Activated += new global::System.EventHandler(this.miPreferencesClicked);
200 this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler(this.ArmyRowActivated); 205 this.treeUnits.RowActivated += new global::Gtk.RowActivatedHandler(this.ArmyRowActivated);
201 this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler(this.OnTreeUnitsPopupMenu); 206 this.treeUnits.PopupMenu += new global::Gtk.PopupMenuHandler(this.OnTreeUnitsPopupMenu);
202 this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(this.UnitTreeButtonPressed); 207 this.treeUnits.ButtonPressEvent += new global::Gtk.ButtonPressEventHandler(this.UnitTreeButtonPressed);
203 this.unitsNotebook.Removed += new global::Gtk.RemovedHandler(this.NotebookPageRemoved); 208 this.unitsNotebook.Removed += new global::Gtk.RemovedHandler(this.NotebookPageRemoved);
204 } 209 }