Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
comparison gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs @ 88:b0089e875754
Re #308: Make GTK# UI translatable
* Make FrmNewUnit translatable
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 29 Dec 2010 20:56:03 +0000 |
parents | 68804784bf6f |
children | 31d54f67d50d |
comparison
equal
deleted
inserted
replaced
87:40857cfb309b | 88:b0089e875754 |
---|---|
4 { | 4 { |
5 public partial class FrmNewUnit | 5 public partial class FrmNewUnit |
6 { | 6 { |
7 private global::Gtk.VBox vbox2; | 7 private global::Gtk.VBox vbox2; |
8 private global::Gtk.HBox hbox1; | 8 private global::Gtk.HBox hbox1; |
9 private global::Gtk.Label label1; | 9 private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblUnitType; |
10 private global::Gtk.ScrolledWindow GtkScrolledWindow; | 10 private global::Gtk.ScrolledWindow GtkScrolledWindow; |
11 private global::Gtk.TreeView lstUnitTypes; | 11 private global::Gtk.TreeView lstUnitTypes; |
12 private global::Gtk.Label lblNewUnitWarning; | 12 private global::Gtk.Label lblNewUnitWarning; |
13 private global::Gtk.Button buttonCancel; | 13 private global::Gtk.Button bttnCancel; |
14 private global::Gtk.Button buttonOk; | 14 private global::Gtk.Button bttnCreate; |
15 | 15 |
16 protected virtual void Build() | 16 protected virtual void Build() |
17 { | 17 { |
18 global::Stetic.Gui.Initialize(this); | 18 global::Stetic.Gui.Initialize(this); |
19 // Widget IBBoard.WarFoundry.GUI.GTK.FrmNewUnit | 19 // Widget IBBoard.WarFoundry.GUI.GTK.FrmNewUnit |
35 // Container child vbox2.Gtk.Box+BoxChild | 35 // Container child vbox2.Gtk.Box+BoxChild |
36 this.hbox1 = new global::Gtk.HBox(); | 36 this.hbox1 = new global::Gtk.HBox(); |
37 this.hbox1.Name = "hbox1"; | 37 this.hbox1.Name = "hbox1"; |
38 this.hbox1.Spacing = 6; | 38 this.hbox1.Spacing = 6; |
39 // Container child hbox1.Gtk.Box+BoxChild | 39 // Container child hbox1.Gtk.Box+BoxChild |
40 this.label1 = new global::Gtk.Label(); | 40 this.lblUnitType = new global::IBBoard.GtkSharp.Translatable.TranslatableLabel(); |
41 this.label1.Name = "label1"; | 41 this.lblUnitType.Name = "lblUnitType"; |
42 this.label1.LabelProp = global::Mono.Unix.Catalog.GetString("Unit Type:"); | 42 this.lblUnitType.LabelProp = global::Mono.Unix.Catalog.GetString("unit type"); |
43 this.hbox1.Add(this.label1); | 43 this.hbox1.Add(this.lblUnitType); |
44 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.label1])); | 44 global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.lblUnitType])); |
45 w2.Position = 0; | 45 w2.Position = 0; |
46 w2.Expand = false; | 46 w2.Expand = false; |
47 w2.Fill = false; | 47 w2.Fill = false; |
48 // Container child hbox1.Gtk.Box+BoxChild | 48 // Container child hbox1.Gtk.Box+BoxChild |
49 this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); | 49 this.GtkScrolledWindow = new global::Gtk.ScrolledWindow(); |
84 w8.Name = "dialog1_ActionArea"; | 84 w8.Name = "dialog1_ActionArea"; |
85 w8.Spacing = 6; | 85 w8.Spacing = 6; |
86 w8.BorderWidth = ((uint)(5)); | 86 w8.BorderWidth = ((uint)(5)); |
87 w8.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); | 87 w8.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); |
88 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild | 88 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild |
89 this.buttonCancel = new global::Gtk.Button(); | 89 this.bttnCancel = new global::Gtk.Button(); |
90 this.buttonCancel.CanDefault = true; | 90 this.bttnCancel.CanDefault = true; |
91 this.buttonCancel.CanFocus = true; | 91 this.bttnCancel.CanFocus = true; |
92 this.buttonCancel.Name = "buttonCancel"; | 92 this.bttnCancel.Name = "bttnCancel"; |
93 this.buttonCancel.UseStock = true; | 93 this.bttnCancel.UseStock = true; |
94 this.buttonCancel.UseUnderline = true; | 94 this.bttnCancel.UseUnderline = true; |
95 this.buttonCancel.Label = "gtk-cancel"; | 95 this.bttnCancel.Label = "gtk-cancel"; |
96 this.AddActionWidget(this.buttonCancel, -6); | 96 this.AddActionWidget(this.bttnCancel, -6); |
97 global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.buttonCancel])); | 97 global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.bttnCancel])); |
98 w9.Expand = false; | 98 w9.Expand = false; |
99 w9.Fill = false; | 99 w9.Fill = false; |
100 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild | 100 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild |
101 this.buttonOk = new global::Gtk.Button(); | 101 this.bttnCreate = new global::Gtk.Button(); |
102 this.buttonOk.Sensitive = false; | 102 this.bttnCreate.Sensitive = false; |
103 this.buttonOk.CanDefault = true; | 103 this.bttnCreate.CanDefault = true; |
104 this.buttonOk.CanFocus = true; | 104 this.bttnCreate.CanFocus = true; |
105 this.buttonOk.Name = "buttonOk"; | 105 this.bttnCreate.Name = "bttnCreate"; |
106 this.buttonOk.UseStock = true; | 106 this.bttnCreate.UseStock = true; |
107 this.buttonOk.UseUnderline = true; | 107 this.bttnCreate.UseUnderline = true; |
108 this.buttonOk.Label = "gtk-ok"; | 108 this.bttnCreate.Label = "gtk-ok"; |
109 this.AddActionWidget(this.buttonOk, -5); | 109 this.AddActionWidget(this.bttnCreate, -5); |
110 global::Gtk.ButtonBox.ButtonBoxChild w10 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.buttonOk])); | 110 global::Gtk.ButtonBox.ButtonBoxChild w10 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.bttnCreate])); |
111 w10.Position = 1; | 111 w10.Position = 1; |
112 w10.Expand = false; | 112 w10.Expand = false; |
113 w10.Fill = false; | 113 w10.Fill = false; |
114 if ((this.Child != null)) | 114 if ((this.Child != null)) |
115 { | 115 { |
117 } | 117 } |
118 this.DefaultWidth = 400; | 118 this.DefaultWidth = 400; |
119 this.DefaultHeight = 318; | 119 this.DefaultHeight = 318; |
120 this.Show(); | 120 this.Show(); |
121 this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler(this.OnRowActivated); | 121 this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler(this.OnRowActivated); |
122 this.buttonCancel.Activated += new global::System.EventHandler(this.OnButtonCancelActivated); | 122 this.bttnCancel.Activated += new global::System.EventHandler(this.OnButtonCancelActivated); |
123 this.buttonOk.Clicked += new global::System.EventHandler(this.OnButtonOkClicked); | 123 this.bttnCreate.Clicked += new global::System.EventHandler(this.OnButtonOkClicked); |
124 } | 124 } |
125 } | 125 } |
126 } | 126 } |