Mercurial > repos > IBBoard.WarFoundry.GUI.GTK
comparison gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewArmy.cs @ 86:9515b57ba752
Re #308: Make GTK# UI translatable
* Make form buttons translatable using new method
* Swap "Create" button to a stock "OK" so that we don't lose the image on translation
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Wed, 29 Dec 2010 19:41:51 +0000 |
parents | bfb29a60b802 |
children | 40857cfb309b |
comparison
equal
deleted
inserted
replaced
85:bfb29a60b802 | 86:9515b57ba752 |
---|---|
10 private global::Gtk.HBox hbox2; | 10 private global::Gtk.HBox hbox2; |
11 private global::Gtk.SpinButton sbPointsValue; | 11 private global::Gtk.SpinButton sbPointsValue; |
12 private global::Gtk.Label lblArmyName; | 12 private global::Gtk.Label lblArmyName; |
13 private global::Gtk.Label lblArmySize; | 13 private global::Gtk.Label lblArmySize; |
14 private global::Gtk.Label lblGameSystem; | 14 private global::Gtk.Label lblGameSystem; |
15 private global::Gtk.Label lblRace; | 15 private global::Gtk.Label lblRaceList; |
16 private global::Gtk.ComboBoxEntry systemCombo; | 16 private global::Gtk.ComboBoxEntry systemCombo; |
17 private global::Gtk.Entry txtArmyName; | 17 private global::Gtk.Entry txtArmyName; |
18 private global::Gtk.Button bttnCancel; | 18 private global::Gtk.Button bttnCancel; |
19 private global::Gtk.Button bttnCreate; | 19 private global::Gtk.Button bttnCreate; |
20 | 20 |
112 this.table1.Add(this.lblGameSystem); | 112 this.table1.Add(this.lblGameSystem); |
113 global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1[this.lblGameSystem])); | 113 global::Gtk.Table.TableChild w8 = ((global::Gtk.Table.TableChild)(this.table1[this.lblGameSystem])); |
114 w8.XOptions = ((global::Gtk.AttachOptions)(4)); | 114 w8.XOptions = ((global::Gtk.AttachOptions)(4)); |
115 w8.YOptions = ((global::Gtk.AttachOptions)(4)); | 115 w8.YOptions = ((global::Gtk.AttachOptions)(4)); |
116 // Container child table1.Gtk.Table+TableChild | 116 // Container child table1.Gtk.Table+TableChild |
117 this.lblRace = new global::Gtk.Label(); | 117 this.lblRaceList = new global::Gtk.Label(); |
118 this.lblRace.Name = "lblRace"; | 118 this.lblRaceList.Name = "lblRaceList"; |
119 this.lblRace.LabelProp = global::Mono.Unix.Catalog.GetString("race"); | 119 this.lblRaceList.LabelProp = global::Mono.Unix.Catalog.GetString("race"); |
120 this.table1.Add(this.lblRace); | 120 this.table1.Add(this.lblRaceList); |
121 global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.lblRace])); | 121 global::Gtk.Table.TableChild w9 = ((global::Gtk.Table.TableChild)(this.table1[this.lblRaceList])); |
122 w9.TopAttach = ((uint)(1)); | 122 w9.TopAttach = ((uint)(1)); |
123 w9.BottomAttach = ((uint)(2)); | 123 w9.BottomAttach = ((uint)(2)); |
124 w9.XOptions = ((global::Gtk.AttachOptions)(4)); | 124 w9.XOptions = ((global::Gtk.AttachOptions)(4)); |
125 w9.YOptions = ((global::Gtk.AttachOptions)(4)); | 125 w9.YOptions = ((global::Gtk.AttachOptions)(4)); |
126 // Container child table1.Gtk.Table+TableChild | 126 // Container child table1.Gtk.Table+TableChild |
174 this.bttnCreate = new global::Gtk.Button(); | 174 this.bttnCreate = new global::Gtk.Button(); |
175 this.bttnCreate.Sensitive = false; | 175 this.bttnCreate.Sensitive = false; |
176 this.bttnCreate.CanDefault = true; | 176 this.bttnCreate.CanDefault = true; |
177 this.bttnCreate.CanFocus = true; | 177 this.bttnCreate.CanFocus = true; |
178 this.bttnCreate.Name = "bttnCreate"; | 178 this.bttnCreate.Name = "bttnCreate"; |
179 this.bttnCreate.UseStock = true; | |
179 this.bttnCreate.UseUnderline = true; | 180 this.bttnCreate.UseUnderline = true; |
180 // Container child bttnCreate.Gtk.Container+ContainerChild | 181 this.bttnCreate.Label = "gtk-ok"; |
181 global::Gtk.Alignment w15 = new global::Gtk.Alignment(0.5F, 0.5F, 0F, 0F); | |
182 // Container child GtkAlignment.Gtk.Container+ContainerChild | |
183 global::Gtk.HBox w16 = new global::Gtk.HBox(); | |
184 w16.Spacing = 2; | |
185 // Container child GtkHBox.Gtk.Container+ContainerChild | |
186 global::Gtk.Image w17 = new global::Gtk.Image(); | |
187 w17.Pixbuf = global::Stetic.IconLoader.LoadIcon(this, "gtk-ok", global::Gtk.IconSize.Menu); | |
188 w16.Add(w17); | |
189 // Container child GtkHBox.Gtk.Container+ContainerChild | |
190 global::Gtk.Label w19 = new global::Gtk.Label(); | |
191 w19.LabelProp = global::Mono.Unix.Catalog.GetString("C_reate"); | |
192 w19.UseUnderline = true; | |
193 w16.Add(w19); | |
194 w15.Add(w16); | |
195 this.bttnCreate.Add(w15); | |
196 this.AddActionWidget(this.bttnCreate, -5); | 182 this.AddActionWidget(this.bttnCreate, -5); |
197 global::Gtk.ButtonBox.ButtonBoxChild w23 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCreate])); | 183 global::Gtk.ButtonBox.ButtonBoxChild w15 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w13[this.bttnCreate])); |
198 w23.Position = 1; | 184 w15.Position = 1; |
199 w23.Expand = false; | 185 w15.Expand = false; |
200 w23.Fill = false; | 186 w15.Fill = false; |
201 if ((this.Child != null)) | 187 if ((this.Child != null)) |
202 { | 188 { |
203 this.Child.ShowAll(); | 189 this.Child.ShowAll(); |
204 } | 190 } |
205 this.DefaultWidth = 370; | 191 this.DefaultWidth = 370; |