comparison gtk-gui/IBBoard.WarFoundry.GUI.GTK.FrmNewUnit.cs @ 89:31d54f67d50d

Re #308: Make GTK# UI translatable * Start to make use of TranslatableButtons now that we've finally got them working and usable
author IBBoard <dev@ibboard.co.uk>
date Thu, 30 Dec 2010 21:00:00 +0000
parents b0089e875754
children a754a2d1881c
comparison
equal deleted inserted replaced
88:b0089e875754 89:31d54f67d50d
8 private global::Gtk.HBox hbox1; 8 private global::Gtk.HBox hbox1;
9 private global::IBBoard.GtkSharp.Translatable.TranslatableLabel lblUnitType; 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 bttnCancel; 13 private global::IBBoard.GtkSharp.Translatable.TranslatableButton bttnCancel;
14 private global::Gtk.Button bttnCreate; 14 private global::IBBoard.GtkSharp.Translatable.TranslatableButton 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
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.bttnCancel = new global::Gtk.Button(); 89 this.bttnCancel = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
90 this.bttnCancel.CanDefault = true;
91 this.bttnCancel.CanFocus = true; 90 this.bttnCancel.CanFocus = true;
92 this.bttnCancel.Name = "bttnCancel"; 91 this.bttnCancel.Name = "bttnCancel";
93 this.bttnCancel.UseStock = true; 92 this.bttnCancel.UseStock = true;
94 this.bttnCancel.UseUnderline = true; 93 this.bttnCancel.UseUnderline = true;
95 this.bttnCancel.Label = "gtk-cancel"; 94 this.bttnCancel.Label = "gtk-cancel";
96 this.AddActionWidget(this.bttnCancel, -6); 95 this.AddActionWidget(this.bttnCancel, -6);
97 global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.bttnCancel])); 96 global::Gtk.ButtonBox.ButtonBoxChild w9 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w8[this.bttnCancel]));
98 w9.Expand = false; 97 w9.Expand = false;
99 w9.Fill = false; 98 w9.Fill = false;
100 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild 99 // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
101 this.bttnCreate = new global::Gtk.Button(); 100 this.bttnCreate = new global::IBBoard.GtkSharp.Translatable.TranslatableButton();
102 this.bttnCreate.Sensitive = false;
103 this.bttnCreate.CanDefault = true;
104 this.bttnCreate.CanFocus = true; 101 this.bttnCreate.CanFocus = true;
105 this.bttnCreate.Name = "bttnCreate"; 102 this.bttnCreate.Name = "bttnCreate";
106 this.bttnCreate.UseStock = true; 103 this.bttnCreate.UseStock = true;
107 this.bttnCreate.UseUnderline = true; 104 this.bttnCreate.UseUnderline = true;
108 this.bttnCreate.Label = "gtk-ok"; 105 this.bttnCreate.Label = "gtk-ok";
113 w10.Fill = false; 110 w10.Fill = false;
114 if ((this.Child != null)) 111 if ((this.Child != null))
115 { 112 {
116 this.Child.ShowAll(); 113 this.Child.ShowAll();
117 } 114 }
118 this.DefaultWidth = 400; 115 this.DefaultWidth = 403;
119 this.DefaultHeight = 318; 116 this.DefaultHeight = 259;
120 this.Show(); 117 this.Show();
121 this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler(this.OnRowActivated); 118 this.lstUnitTypes.RowActivated += new global::Gtk.RowActivatedHandler(this.OnRowActivated);
122 this.bttnCancel.Activated += new global::System.EventHandler(this.OnButtonCancelActivated);
123 this.bttnCreate.Clicked += new global::System.EventHandler(this.OnButtonOkClicked);
124 } 119 }
125 } 120 }
126 } 121 }