Mercurial > repos > IBDev-IBBoard.WarFoundry.GUI.GTK
diff 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 |
line wrap: on
line diff
--- a/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Fri Dec 31 15:43:05 2010 +0000 +++ b/gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmMainWindow.cs Sat Jan 01 20:55:07 2011 +0000 @@ -28,6 +28,7 @@ private global::Gtk.Action add; private global::Gtk.Action miExportArmyAs; private global::Gtk.Action miExportAsBasicHtml; + private global::Gtk.Action miPreferences; private global::Gtk.VBox vbox1; private global::Gtk.MenuBar menubar1; private global::Gtk.Toolbar toolbar; @@ -108,11 +109,14 @@ w1.Add(this.add, null); this.miExportArmyAs = new global::Gtk.Action("miExportArmyAs", global::Mono.Unix.Catalog.GetString("Export army as..."), null, "gtk-convert"); this.miExportArmyAs.Sensitive = false; - this.miExportArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army"); + this.miExportArmyAs.ShortLabel = global::Mono.Unix.Catalog.GetString("Export army as..."); w1.Add(this.miExportArmyAs, null); this.miExportAsBasicHtml = new global::Gtk.Action("miExportAsBasicHtml", global::Mono.Unix.Catalog.GetString("Basic HTML"), null, null); this.miExportAsBasicHtml.ShortLabel = global::Mono.Unix.Catalog.GetString("Basic HTML"); w1.Add(this.miExportAsBasicHtml, null); + this.miPreferences = new global::Gtk.Action("miPreferences", global::Mono.Unix.Catalog.GetString("preferences"), null, "gtk-preferences"); + this.miPreferences.ShortLabel = global::Mono.Unix.Catalog.GetString("preferences"); + w1.Add(this.miPreferences, null); this.UIManager.InsertActionGroup(w1, 0); this.AddAccelGroup(this.UIManager.AccelGroup); this.Name = "IBBoard.WarFoundry.GUI.GTK.FrmMainWindow"; @@ -122,7 +126,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='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>"); + 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>"); this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1"))); this.menubar1.Name = "menubar1"; this.vbox1.Add(this.menubar1); @@ -197,6 +201,7 @@ this.bttnUndo.Activated += new global::System.EventHandler(this.undoTBButtonActivated); this.bttnRedo.Activated += new global::System.EventHandler(this.redoTBButtonActivated); this.miExportAsBasicHtml.Activated += new global::System.EventHandler(this.OnMiExportAsBasicHtmlActivated); + this.miPreferences.Activated += new global::System.EventHandler(this.miPreferencesClicked); 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);